The Proteas, who put the tourists in to bat, will have to pull off the highest successful chase ever in an ODI at Potchefstroom after Marsh powered to his third half-century of the series (56 off 42 balls) at the top of the order and Carey helped iron out some of their middle-order woes with a fine knock of 74.
With Ollie Peake just missing out on his first international half-century (48 off 53 balls), it was a more encouraging effort than Australia's capitulation when asked to chase in the first two matches in Durban and Johannesburg.
Pat Cummins was brought back into the team for the day-nighter for only his third ODI since he led Australia's 2023 World Cup triumph in India, but while still the official skipper, the arrangement on Wednesday was for Marsh to continue captaining the team in the last one-dayer before the Test series.
And the mighty hitter continued to lead from the front, reaching his half-century off 33 balls after scoring 60 and 84 in the opening two matches.
He and Travis Head (24 off 20) again gave the side an electric start with another 50-plus stand -- 78 at nine-and-over -- and the real test was to see if the team could this time build well in the middle overs against a Proteas' side, who decided to rest their key spinner Keshav Maharaj among four changes.
It wasn't easy to start with, after Bjorn Fortuin trapped Marsh lbw for 56 and Gerald Coetzee bowled Cooper Connolly (23) with a brilliant yorker, but 20-year-old prospect Peake battled well with Carey as they put on 73 off 88 balls, the sort of partnership Marsh has been crying out to see.
Peake looked a bit crestfallen after he must have thought he'd cracked a boundary off Corbin Bosch to take him to his landmark 50 but Fortuin made a dazzling diving catch behind point to send him packing.
Matt Renshaw (30) and Carey continued the good work with a 66 stand but Australia didn't get the acceleration they'd hoped for in the dying overs, with Carey's 88-ball knock eventually ending at the hands of the excellent Bosch (4-60 off nine overs).
Cameron Green had an eventful time, taking a fearful beamer from Bosch straight into his box, but recovering to hit the next delivery, also a fast full-toss, courageously for six, only to then be bumped out next ball by a short one as Australia went to make .