Jayden Goodwin has produced the most important knock of his fledgling Sheffield Shield career to guide Western Australia to a nail-biting two-wicket victory over South Australia at the WACA Ground.
Chasing 201 for victory, the hosts were in deep trouble at 6-105 and 7-145 on Friday.
Teague Wyllie bravely returned to the crease after retiring hurt earlier in the day, and his 20 off 20 balls got WA to within 33 runs of victory.
Goodwin, the son of former Zimbabwe Test batsman Murray Goodwin, and tail-ender Corey Rocchiccioli then combined for an unbeaten stand to get WA over the line late on day three.
Goodwin, playing just his fourth Shield match, finished 47 not out off 72 balls.
Rocchiccioli, who posted a vital 36 in the first innings, followed it up with an unbeaten 25 off 42 balls in the second dig.
The result gave WA first bragging rights for the new Rod Marsh Cup, named after the late and great Australian wicketkeeper.
It also lifted the two-time defending champions from third to first on the table, with the Redbacks dropping to third.
Earlier on Friday, half centuries from Ben Manenti (66) and Harry Nielsen (51) helped South Australia recover from 6-99 to post 212 in their second innings.
Joel Paris, who suffered groin tightness on Thursday, was able to bowl five overs on Friday on the way to figures of 2-34.
Cameron Bancroft (27), Sam Whiteman (14) and Hilton Cartwright (10) all made starts in WA's run chase before falling to an inspired Brendan Doggett (4-61).
Bancroft edged Doggett to slip, Whiteman holed out in the deep, and Cartwright edged one through to the keeper.
Rising WA star Wyllie retired on four when he was struck on his left elbow by a rising Doggett delivery.
But despite those dismissals and the exit of Wyllie, WA were still on track for victory as they moved to 3-95.
The match swung dramatically on the back of a collapse of 3-10 as Aaron Hardie (21), Josh Philippe (one) and Joel Paris (six) all departed in quick succession.
Charlie Stobo (26 off 35) added some handy runs before becoming the second victim of Manenti (3-19).
And when the spinner struck again to remove the banged-up Wyllie, South Australia were back on top.
But 21-year-old Goodwin and the fast-improving Rocchiccioli held their nerve to get the job done as shadows crept across the pitch on Friday evening.