A £7m overspill annexe could be built to cope with capacity issues at two new high schools before the construction of one is even finished.

Councillors have been warned rising school rolls at James Gillespie's and Boroughmuir High in Edinburgh need to be addressed.

This is despite around £80m being spent on replacements for the over-subscribed secondaries in Marchmont and Fountainbridge.

The main James Gillespie's building opened last summer, while Boroughmuir High is due to open next summer after a string of delays to the project.

According to the latest school roll projections, the popular state schools will have "breached capacity" by 2020.

James Gillespie's faces the added pressure of being the nominated Gaelic high school.

To solve the issue, city council officials have suggested converting a building between the two sites into a "shared annexe".

A report due to go before councillors on Tuesday estimates it would cost £7.2m to transform the Darroch building on Gillespie Street into a "contemporary learning and teaching environment".

Other sites will be considered but officials said given cost considerations the Darroch building may be the best option for an annexe close to both schools.

A further paper on the potential project will be prepared for early next year.

Councillor Melanie Main, Green spokeswoman for education, said the local authority had a "yawning gap" in funding.

She said: "Over the last four years, Greens have consistently questioned the forecasting of school rolls and now chickens are coming home to roost.

"The new Boroughmuir High, still work in progress, will be too small when it opens next August.

"At least the council reports for next week recognise the need to improve forecasting techniques and to work with other councils in making that better.

"But that is for the future. Right now the city has a yawning gap in funding to make sure there are enough class places for all our children and young people."

She said the Scottish Government needed to "step up to the plate" to ensure sufficient funding was in place in the future.