A controversial plan for the biggest expansion of Cardiff in a century has been approved by a planning inspector.

It was the final major barrier to building an additional 20,000 homes in the city over the next decade.

The Local Development Plan (LDP) sets out where new houses can be built, based on a forecast that the population will grow by a quarter over 20 years.

Cardiff council said the city was in "dire need" of the plan, to help it manage its growth.

A final decision will be made by the local authority in the coming weeks, but it is expected to be rubber stamped by the council.

Under the plan:

41,400 new homes will be built by 2026, half of them on brownfield sites or old industrial areas

12,200 homes have already been built, with 10,800 either already in construction or given planning permission

18,000 remain to be built - 13,000 of them on greenfield sites in north west Cardiff, north of M4 junction 33, north east Cardiff and east Pontprennau

The inspector has not given as much protection to the greenbelt on the edge of the city as a number of councillors and residents had campaigned for.

The process has been long and controversial.

Supporters say the expansion is needed to deal with the shortage of housing in the city, while opponents claim the city's infrastructure will not be able to cope.

The plan is based on projections of a growth in the population from the 320,000 to nearly 400,000 over the period between 2006 and 2026.

The last time Cardiff grew at this scale was at the height of the coal industry a century ago.

'Urgent housing needs'

Cardiff council cabinet member for planning and sustainability Ramesh Patel said the city was "in dire need" of the plan.

"The last plan was approved 19 years ago and has led to insufficient land being made available for urgent housing needs," he said.

"When the new plan is finally adopted at the end of January, we will ensure that developments in the city are managed effectively with new transport infrastructure, schools, health facilities and other community facilities.

"The plan gives us the control to guide development and manage the growth of the city."