A £41m replacement secondary school in Edinburgh is due to open three months earlier than expected after construction issues were resolved.

Portobello High was originally due to open after the summer holidays but water drainage problems forced the opening to be pushed back to January 2017.

Edinburgh City Council revealed on Tuesday that the project is now on track to be handed over after the October break.

The new Portobello High will become the city's largest secondary school with space for 1400 pupils.

As well as modern teaching facilities, it will have indoor and outdoor sports facilities, including a swimming pool and two all weather pitches.

The sports facilities will be available for community use outside of school hours.

Construction of the new building, which will replace the ageing 1960s complex on Duddingston Road, was delayed for six years in a wrangle over whether or not it should be built on Portobello Park.

The local authority had to ask government ministers to pass a bill allowing them to use the common good land for educational purposes.

Locals will be able to book the pitches free of charge as one of the compensation measures put in place to replace the loss of Portobello Park.

A new £1m park is also planned for the current Portobello High and St John's RC Primary School site.

Education convener Paul Godzik said: "I am sure that parents, pupils and staff will be as delighted as I am that we have brought forward the date of the school opening to October.

"Thanks must go to the council's project team, Balfour Beatty and Scottish Water for working so closely over the past few months to solve the drainage issues and accelerate the school opening.

"The new Portobello High School is looking really impressive and it's clear this is going to be a fantastic, state of the art facility.

"Rebuilding Portobello High School is one of the Capital Coalition's highest priorities and we were determined to ensure we met this commitment."