Spain's San Fermin festival, best known for its daily running of the bulls, came to an official close at midnight on Thursday during a candlelight ceremony attended by thousands of revellers.
"People of Pamplona, the San Fermin festival is over. It has been spectacular, thanks to you it is the best festival in the world," Pamplona mayor Enrique Maya shouted from the balcony of city hall to cheers from the crowd.
The revellers then sang a mournful song lamenting the end of the festivities called "Pobre de Mi", or "Poor Me", while raising candles into the air or holding up red scarves over their heads which they swayed from side to side as fireworks lit up the sky.
Maya stood on the same balcony at noon on July 6 to declare the festival officially open, sparking frenzied scenes as the thousands of people who jammed into the square in front of city hall sprayed each other with sangria.
Spain's best-known festival dates back to medieval times and it features religious procession, folk dancing, concerts and street drinking but the highlight is the morning bull runs held through Pamplona's cobbled streets.
Half-tonne fighting bulls wounded three thrill-seekers in the final bull-run held on Thursday, bringing the overall tally of injured this year to 43, according to the regional government of Navarra of which Pamplona is capital.
The six bulls and six steers charged 846.6 metres from a pen to the bullring in a quick two minutes 20 seconds in the eighth and last daily bull-run of a festival expected to have drawn more than a million tourists.
Thousands of daredevils in white clothes and red bandanas packed around the animals on every bull-run of the festival, many dicing with danger by running just ahead of the bulls' horns.
In the final run, three people tumbled and were hospitalised: a 21-year-old Frenchman with a shoulder injury, and two local Pamplona residents aged 43 and 54 with cuts and bruises to their heads.
"The bull runs were very calm if you take into account the high risk that they involve," the regional government of Navarra's health minister, Marta Vera Janin, told a news conference.
Last year 37 people were injured during San Fermin, including nine due to gorings -- a potentially lethal injury.
In the most serious injury this year, a bull's horn sliced a 20-centimetre (eight-inch) deep wound into the side of 40-year-old Pamplona resident Mikel Sabate on Tuesday, piercing his diaphragm but missing vital organs.
He remains in hospital after undergoing a three-hour operation but his life is not in danger.
"When you are gored, you feel as if you have been stabbed, like a truck has run over you. My back was covered in blood, but those are the risks of the bull run," Sabate told reporters from his hospital bed after undergoing surgery.
A bull's horn skewered another 41-year-old Spaniard in the arm on the same day.
A 25-year-old Australian man was gored in his right thigh July 8 after he taunted a bull by jumping and flapping his arms behind it in the bullring. When the bull turned, he tumbled in the sand and was attacked.
He also remains in hospital but is expected to be released on Friday.
A 23-year-old Frenchman was gored July 9, but less seriously.
Every year 200-300 participants in the run are injured, around three percent seriously. Most are hurt after falling but some are trampled or gored by the bulls despite increased safety measures.
The last death occurred two years ago when a bull gored a 27-year-old Spaniard to death, piercing his neck, heart and lungs with its horns in front of hordes of tourists.
Nobel prize-winning novelist Ernest Hemingway made the San Fermin famous around the world with "The Sun Also Rises," a novel based on his first visit to Pamplona in 1923.
Festival turnout figures were not yet available but before the start of the event Pamplona officials predicted the city of some 200,000 residents would at least match last year's figure of 1.5 million people and a hotel occupancy rate of over 90 percent.