Edinburgh risks being turned into a "hollow shell" if it does not find a way to manage the number of tourists flocking to the city, it has been warned.

Scotland's capital is the country's top tourist destination and the second in the UK behind London, welcoming around four million visitors each year.

They reportedly generate around £1.3bn for the local economy and help support 30,000 jobs.

But the city is in danger of becoming a victim of its own popularity if it does not find a balance between the demands of visitors, residents and local businesses, according to Edinburgh World Heritage.

A spokesman for the group said: "As we welcome our influx of summer visitors, we should remember that Edinburgh has always attracted large numbers of people, drawn here for both business and leisure.

"Hotel occupancy is high and the growth of the short-term holiday lets sector has been exponential in the past five years.

"Visitor attractions are also reporting record increases in numbers and are near capacity, while residents in the Old Town are under increasing pressure from the visitor economy."

He added: "Does this mean the city is now 'full'? Venice receives over 20 million visitors a year and has become a hollow city-museum shell.

"If we are to avoid the same fate, we need to balance the needs of visitors, residents and local businesses to ensure the city continues to thrive.

"This means we must seek to understand the capacity limits of our fragile, historic city."

The warning comes less than a month before the start of the Edinburgh Festival, the city's biggest tourist event. More than 2.4 million tickets were handed out for Fringe shows last year.

In 2015, 3.85 million people visited Edinburgh, up about 580,000 compared to 2010.

Between 2010 and 2014 the number of visitors to the top five attractions in the city rose by more than half from 4.1 million to 6.2 million.

The National Museum of Scotland topped the table with 1.6 million visitors in 2014, followed by Edinburgh Castle with 1.4 million.

There has also been a big rise in traffic at Edinburgh Airport, with the total number of passengers rising by nearly a third between 2005 and 2015.