Tunisia's double gold medallist Oussama Mellouli has decided to compete at the Tokyo Games, changing his mind about boycotting his sixth Olympics.
The 37-year-old 10km open water swimmer had announced his international retirement earlier in the week after a dispute with his national federation.
"After a month of suffering, I lose all hope of reconciliation or of winning my case. So I decided to retire from international competitions and boycott the Tokyo Games," he posted on Instagram.
However, Mellouli said in an Instagram post on Wednesday that Tunisian Olympic Committee President Mahrez Boussian had promised to settle the dispute after the Games and insisted on him taking part.
The post was accompanied by a photograph of Mellouli and Boussian holding the Tunisia flag.
"The President of (world body) FINA gave me great advice to not rush my decision and stay calm and take part in these Olympics," Mellouli told Swimming World.
"Everything has gone back to normal within 24 hours, and I'm very grateful for that.
"I'm also very proud to represent my country in these Olympics, and I'm looking forward to racing the best athletes in the world in Tokyo."
Mellouli did not give details but media reports referenced a long-running legal dispute with the Tunisian swimming federation.
Mellouli won 1500m gold in the 2008 Beijing Olympics - ahead of Australian Grant Hackett - and the open-water title in London four years later, when he also claimed a 1500m bronze medal in the pool.
He qualified for Tokyo at an event in Portugal in June.
His 2012 gold made him the first swimmer to win titles in both the pool and open water.
Australian Associated Press