The Edinburgh Festival Fringe has announced that a record number of tickets were issued, both paid for and free, this year, with 1,943,493 tickets picked up by customers over the past month.
This is a 5% rise on last year's total and higher than the festival's previous record, in 2011, of 1.87m.
With the addition of attendances to the two "free Fringe" festivals, which do not involve tickets, it is estimated that there were more than 2m admissions to shows and events at this year's festival. It represents a bounceback from last year, which saw a drop of 1% from the year before.
The event saw 45,464 performances of 2871 shows at 273 venues across the city.
A spokesman for the Fringe, which came to an end yesterday, said the total only included ticketed events, but this does include some free events, such as the BBC shows at Potterow.
Kath Mainland, chief executive of the Edinburgh Festival Fringe Society, said: "Our loyal and enthusiastic audience has once again been treated to the most amazing cultural experience and has been both challenged and entertained by a programme of spectacular work across all artforms from all around the world.
"Over the past 25 days, audiences from Edinburgh, Scotland, the rest of the UK and across the globe have been inspired by world-class performers, writers and artists in the largest celebration of art and entertainment in the world.
"I would like, on behalf of the hundreds of thousands of people who visited the Fringe this year, to thank them for showing us their incredible talent and courage by bringing so many extraordinary shows and events to our capital."
Figures are not yet available for the second running of the Glasgow box office at ScotRail's Queen Street Station.
A spokesman for the Free Edinburgh Fringe Festival said: "All of the shows have been busy every single day, with some having queues around the block. Some of our venues have said it has been their best year ever, not just compared to last year, and if you add the Free Fringe, the total of attendances do go well over two million."
This year's Amnesty International Freedom of Expression Award went to the show Nirbhaya at the Assembly Hall, while Bridget Christie won the coveted Edinburgh Comedy Award.
Last year's drop in tickets issued was generally attributed to a clash with the London Olympics.
This year has also seen a healthy Edinburgh International Book Festival.
There have been 225,000 visits to Charlotte Square Gardens this year, and ticket sales were up nearly 6% on 2012, although the festival did not release exact ticket sales. Sales of books in the book festival's two bookshops also rose 6%.
In the past 17 days, the book festival featured 800 authors from 40 countries taking part in 700 events including Salman Rushdie, Andrew Marr in his first public appearance this year, US statistician Nate Silver who predicted a No vote in the Scottish Independence referendum, and five of the authors longlisted for the 2013 Man Booker Prize.
Nick Barley, director of the book festival, said "It's about so much more than the numbers.
"We have welcomed an extraordinary array of writers, thinkers, politicians and poets to discuss everything from the representation of women in the arts to the question of Scottish Independence.
"It really has been a wonderful two weeks."