Serena Williams bowed out of the US Open and professional tennis with a third-round defeat by Ajla Tomljanovic.

Williams’ performances against Danka Kovinic and Anett Kontaveit had given hope to the tens of thousands who have flocked to Flushing Meadows hoping her swansong could have a fairy-tale ending.

But, despite a memorable second-set fightback in a raucous atmosphere, there will be no record-equalling 24th grand slam singles title, with Williams succumbing to a 7-5 6-7 (4) 6-1 loss.

The 40-year-old, who played her first professional tennis match back in 1995, walked calmly to the net after netting a final forehand before waving to all sides of Arthur Ashe Stadium while ‘Simply The Best’ played over the loudspeakers.

Addressing the crowd through tears, Williams said: “Thank you so much, you guys were amazing. I tried. Thank you daddy, I know you’re watching. Thanks mom.

“I just thank everyone that’s here, that’s been on my side for so many years, literally decades, But it all started with my parents and they deserve everything so I’m really grateful for them. And I wouldn’t be Serena if there wasn’t Venus, so thank you Venus. It’s been a fun ride.”

Asked whether there could be another chapter, Williams added: “I don’t think so but you never know.”

Williams, who again took her entrance after a montage hailing her greatness, made a nervous start and dropped serve straight away but she quickly rallied, broke Tomljanovic back again and began to get on top.

Williams’ movement was sharp and her groundstrokes strong, and Arthur Ashe was ready to celebrate another set in the bag when she broke serve again to lead 5-3.

But Williams, who has played very little tennis in the last 18 months, tightened up at just the wrong moment, struggled to find her serve and Tomljanovic clinched the set with four games in a row.

The 29-year-old was looking to reach the fourth round in New York for the first time but she is no stranger to the second week of slams having made back-to-back Wimbledon quarter-finals.

This occasion, of course, was something completely new and she felt the full force of Williams’ frustration at having let the first set slip away.

With her serve now engaged, the 40-year-old stormed into a 4-0 lead. Back came Tomljanovic with two games in a row, and the Australian pushed for another break but Williams dug deep and roared long and loud when she held on.

But again she struggled to get over the line, failing to convert four set points in a long eighth game and then giving up her serve as Tomljanovic levelled at 5-5.

Serena Williams roars encouragement to herself
Serena Williams roars encouragement to herself (Frank Franklin II/AP)

At 4-4 in the tie-break, Williams was three points away from the end, but she took a deep breath, served an ace and forced a decider.

The delirious crowd were on their feet, and Williams began the third set in perfect fashion by again breaking the Tomljanovic serve.

But, with the match approaching the three-hour mark, the physical effort Williams had put in began to take its toll and she had little more left to give.

Ajla Tomljanovic held her nerve
Ajla Tomljanovic held her nerve (Charles Krupa/AP)

At 5-1, Williams was given a pre-emptive standing ovation. She hung on grimly, saving five match points in vintage fashion, but with the sixth it was all over.

Tomljanovic, who will next play Liudmila Samsonova, described the moment as “surreal”.

She said: “I’m feeling really sorry just because I love Serena just as much as you guys do. What she’s done for the sport of tennis is incredible. I never thought I’d have the chance to play her in her last match when I was a kid watching all those finals.”