If tennis were a movie, the script would be ripped up on an almost daily basis. At the start of the tournament, Serena Williams was supposed to tear through the draw and win her 24th major to equal the all-time record of Margaret Court. The American left after three matches; the Australian, for better or worse, lingered into the second week, honoured then attacked, but still standing.

The final was scheduled to pitch the current world No 1, Ashleigh Barty, against Simona Halep, who once topped the rankings and who has played with such irresistible brilliance during the fortnight it was tempting to etch her name on the trophy before they even stepped on to Rod Laver Arena on Saturday night in Melbourne. Neither of them have made it.

Instead, Garbiñe Muguruza, who arrived here recovering from a virus and unseeded in a slam for the first time since 2014, will play the young American Sofia Kenin, the 14th seed who committed the crime of beating Barty 7-6 (6), 7-5 on the hottest day of the tournament.

The heat and the disappointment had barely faded when up stepped Muguruza, elegant and feisty in equal measure, to save two set points in each frame to upset Halep 7-6 (8), 7-5 in the second semi-final.

Both were close, competitive matches. Both winners deserved to go through. Both losers took their licks like champions and probably left with regrets. Had Barty been able to force a third set after squandering excellent chances to wrap it up in straight sets, they would have had to take a 10-minute break because of the heat. Neither player wanted that and they kept punching to the end. Barty struck eight aces in the first set but failed to summon one in the second and she paid for her waning penetration towards the end, as Kenin moved more confidently inside the court.

Sofia Kenin hugs Ashleigh Barty after sealing her place in the final. Photograph: Dave Hunt/EPA

In the second semi, there was much to admire about the Spaniard’s ability to completely ignore a couple of wretched spells when she could not win a point and she fought back to put Halep under sustained pressure. It made for compelling viewing, but must have been difficult for their supporters to endure.

Kenin’s Russian-born father, Alex, (who calls her Sonia) arrived in America with $300 in his pocket – mirroring the experience of Maria Sharapova and her father – and he could hardly stop beaming in the stands.

While Barty and Kenin did not complain about the heat – pointing out they had grown up in it – Muguruza clearly suffered, despite also having played most of her life in similar conditions. “It was very, very hot and I felt it,” she said. “It killed me after the first set, at the end of the first set. The sun was strong. I didn’t like that much. I would love to see the roof closed. But rules are rules. We have to accept.”

Muguruza, owner of two slams and experienced in big matches, watched some of the first semi-final and said: “Ash had many chances in the first and second sets. Sometimes it happens. Maybe Kenin was very excited to be in this position and she didn’t think that much about the score, just went for it. Ash being home, I think she had a little bit of extra pressure. But she’s No 1 in the world. She did semis. She’s fine, I’m sure.”

Now she gets to test herself against Kenin, to see if the young contender plays with as much freedom in the final as she reckons she did in beating Barty. All anyone can be reasonably sure of in this topsy-turvy sport is they will be there on Saturday night.