Australia’s gold drought is finally over at the world swimming championships after Emily Seebohm set a national record to defend her 200m backstroke crown in Budapest.

On the penultimate night of the eight-day titles, Seebohm, 25, clocked 2.05.68 seconds to hold out local hope Katinka Hosszu with American Kathleen Baker third.

Australia’s Kaylee McKeown – just 16 years old – set a junior world record (2:05.85) to finish fourth on debut.

It capped a remarkable comeback for Seebohm, who considered walking away from the sport after health issues sabotaged her Rio Olympic campaign.

“I am just amazed at what I have been able to achieve tonight,” said Seebohm.

“But if I had won or lost tonight I would have been so proud of my performances and what I have overcome.”

It was also an enormous relief to an Australian team that had been running out of time to finally register gold.

Bronte Campbell (100m freestyle), Mitch Larkin (100m-200m backstroke) and Seebohm (100m backstroke) had earlier failed to defend their world titles in Hungary.

There was a real fear Australia may go without gold at a world titles for the first time since 1986. But Seebohm ensured Australia jumped from 12th to 7th on the table by striking gold and boosting their tally to eight medals, including five silver.

The United States leads with 14 gold, 10 silver and seven bronze.

The Americans were sparked on day seven by Caeleb Dressel (100m butterfly, 50m freestyle and a world-record 4x100m mixed freestyle relay) who became the first person to win three gold medals in one day.

Seebohm left Rio in tears after failing to qualify for the 200m final as the hot favourite and finishing second last in her pet event, the 100m backstroke.

A member of the Australian team since she was 14, Seebohm considered retirement before being urged by her partner Larkin to give it another try.

She had also been battling endometriosis at Rio, a painful condition where tissue usually found inside the uterus grows outside. She underwent surgery to treat it in late 2016 and has not looked back.

“Mitch was my saviour, to keep pushing me and help me through every stage,” Seebohm said.

Spurred on by a fanatical crowd, Hosszu looked set to pull off a major boilover when she loomed large in lane one. But Seebohm said the raucous fans only added to her resolve.

“It helped me give a little bit more than I had,” said Seebohm, who claimed gold by 0.17 of a second.

Seebohm denied that there was pressure to grab an elusive gold but hoped her breakthrough win would inspire Australia on the final day.

World champion Campbell (50m freestyle), Rio 400m gold medallist Mack Horton (1500m freestyle) and Australia’s men’s and women’s medley relay teams will be in finals action on day eight.