In what French officials hoped to be the conclusion of a years-long nail-biter, Paris Mayor Anne Hidalgo plunged into the Seine on Wednesday and declared it sufficiently clean for Olympic swimming competitions.

The mayor, wearing a wet suit, splashed and treaded water for a bit, before affixing her goggles and putting her head down for some serious freestyle.

“It’s pure happiness,” she said after climbing out, having fulfilled a pledge with nine days to go before the start of the Paris Olympics.

After months of delays, and worrying contamination reports, Hidalgo’s symbolic swim in the turquoise-brownish waters was broadcast live on national television. Hundreds of spectators, and assigned soldiers and police officers, also watched from the riverbanks and nearby bridges.

Swimming in the Seine has been banned for a century because of health concerns, primarily due to wastewater that sometimes overflows from the city’s old sewage system into the Seine. In 2015, Hidalgo announced a plan to make the river the star of the Olympic Games, with a floating Opening Ceremonies and triathlon and marathon swimming in the river.

But despite $1.5 billion of investment, bacteria levels stubbornly remained above safe limits, leading to the cancellation of the swimming portion of Paralympic triathlon tests and of the Open Water Swimming World Cup last summer. This year, the Surfrider Foundation environmental group reported “alarming” contamination, with testing at one site over six months showing higher-than-recommended levels of E. coli and enterococci bacteria. The Paris mayor’s promised swim had to be repeatedly postponed, with explanations ranging from excessive rainfall to France’s political turmoil.

As recently as last month, the ambitious project threatened to become an embarrassment. Officials were for the first time talking about a plan B for the highly anticipated Seine competitions. But the gloom has given way to new enthusiasm in recent days, as the weather improved and the Seine’s water quality reached safe limits on most days this month, according to city measurements.

On Saturday, French Sports Minister Amélie Oudéa-Castéra became the first major French official to conquer the Seine. With President Emmanuel Macron’s government on the verge of resignation after this month’s election defeat, she rushed to the river. Her swim, which appeared designed to preempt Hidalgo’s, did not go entirely according to plan. In scenes captured on television, Oudéa-Castéra slipped on the riverbank and then slid into the water.

Macron had also vowed to swim the Seine earlier this year but did not join.

Meanwhile, Hidalgo — whose left-wing Socialist party is newly energized in the wake of the election — led a highly choreographed event on Wednesday. Organizers set up a temporary landing stage. There were so many journalists that some had to watch from outside the security cordon.

“Now we’re ready for the Games,” said Tony Estanguet, the president of the Paris 2024 organizing committee, speaking after he accompanied Hidalgo and regional prefect Marc Guillaume into the water.

Although the weather in the coming days appears to be favorable, there is no guarantee that the Seine will be as clean when the swimming competitions are scheduled to take place in late July and August.

The unusually high flow rate – the result of heavy rainfall earlier this summer — also continues to raise concerns. Unless the river slows down over the next nine days, organizers may be forced to adapt their plans for a floating parade during the Opening Ceremonies on July 26.

Despite these lingering questions, residents who followed Wednesday’s swim said they were increasingly excited for the Games.

“There has been a lot of criticism of the Olympics,” said Margaux Tellier, 34. But making the Seine swimmable, she said, “raises awareness of the environment and of climate change.”

French officials have said they hope to open river-water swimming pools along the Seine for Parisians and visitors, including near the Louvre and Notre Dame, and in other, less-privileged neighborhoods.

“It would be fantastic if there was space for all Parisians to swim,” Tellier said.

Swimming competitions took place in the Seine when Paris hosted its first Olympic Games, in 1900. But industrialization rapidly worsened the river’s pollution levels and public swimming was officially banned in 1923.

In the 1990s, then-Mayor Jacques Chirac vowed to clean the river up, and said he would plunge in himself – which did not happen. But the high-profile interest and the inflow of money that comes with hosting the Olympics sped up a plan that officials hailed as a way for Parisians to reconnect with their city and its river.

The plan partly relied on a new basin designed to prevent sewage from overflowing into the Seine and a water-treatment plant upstream, which were both only inaugurated in recent months. The new basin can collect as much as 20 Olympic-size swimming pools’ worth of excess rain and wastewater during downpours, to limit the risk of the city’s old sewage system being overwhelmed.

City employee Mathis Joubert, 24, said he was “a bit shaky” before venturing into the water on Wednesday. Having grown up in Paris, he had long thought of the Seine as stinky and off-putting. Three years ago, he said, he could not have imagined swimming in the river.

But his dip on Wednesday, he said, “was perfect.”