Victoria Azarenka came from behind to stun Serena Williams in a three-set thriller and reach the US Open final on Thursday.

The unseeded Belarusian fought back to overcome Williams, seeded third, 1-6, 6-3, 6-3 in an hours and 56 minutes under the roof of Arthur Ashe Stadium.

Azarenka will now play Naomi Osaka of Japan in Saturday’s final, who beat American Jennifer Brady. It will be the former world No 1’s first appearance in the final of a tennis major since Williams beat her in the final of the US Open in 2013.

“That’s my favorite number so I guess that’s meant to be,” Azarenka said of her seven-year wait to return to a Grand Slam singles final.

“I’m very grateful for this opportunity. I’m so grateful to be able to play such a champion in the semi-finals,” she added.

Two-time Grand Slam winner Azarenka had never beaten Williams before in a Grand Slam and she seemed to be heading for another agonizing loss after being hammered 6-1 in the first set.

But the 31-year-old turned the tide in set two, upping her service game and drastically reducing her unforced errors as she began to dictate lengthy rallies.

“I knew it’s never over until I have another chance,” said Azarenka.

The player from Belarus also suffered a heartbreaking loss to Williams in the 2012 US Open, when she served for the match at 5-3 in the third set only to lose 7-5.

Azarenka was determined that history would not repeat itself. Serving for the match, she hit a double fault before smashing her fastest serve of the night at 109 mph.

When Williams then challenged and lost an ace that was called in on the next point, it was game, set and match to Azarenka.

“I’ve been there before. Today was gonna be different,” Azarenka said.

Her last Slam title came at the 2013 Australian Open, when she retained the crown she had won a year earlier. The 31-year-old is enjoying a fairytale run at the US Open after claiming last month’s Western and Southern Open tune-up event in New York.

Azarenka became a mother in December 2016. A custody battle over her son has disrupted her career in recent years, but she is currently experiencing a renaissance and is up to 27th in the world rankings.

Williams had been hoping to match Margaret Court’s record of 24 Grand Slam singles titles.