With little pressure thanks to the modest 164-run target to chase, Pakistan openers Ayub and Abdullah Shafique were wary in the opening exchanges, with just one boundary coming off the bat in the first seven overs.
However, once they got comfortable, runs flowed, with the young Saim the far more aggressive of the two. He took his chances, which paid off more often then not, with the lefty bringing up his half century at the end of the 15th over.
Ayub eventually finished with 82 off 71 balls laced with five boundaries and six maximums. He missed out on his maiden ODI ton when Adam Zampa had him caught in the 21st over.
Shafique, the other opener, who was happy to take the back seat when Ayub was having his way with the Aussie bowlers, finished with an unbeaten 64 off 69 deliveries.
Babar Azam also contributed 15 and hit the winning six.
Rauf proves too hot to handle for Aussie batters
Earlier, fast bowler Haris Rauf grabbed a five-for and was the pick of the Pakistan pacers, who bowled out Australia at a mere 163 runs in just 35 overs.
The Rawalpindi-born pacer, who had picked up three wickets in the 1st ODI defeat as well, was again at his devastating best as he ripped through the Aussie middle order after the hosts were invited to bat first by toss winner Mohammad Rizwan.
Rauf’s demolition job was facilitated by Shaheen Shah Afridi, who had removed both the Aussie openers, Jake Fraser-McGurk and Matthew Short, in his opening spell with the new ball.
In the end, Rauf finished with 5 wickets, Afridi with three, while Shah and Mohammad Hasnain grabbed a scalp each.
It was only the second five-wicket ODI haul of Rauf’s career and he was named the player of the match for his feat.
For Australia, Steven Smith top scored with 35. A number of their batters got into doubles figures but failed to stay at the crease for long.
The opening ODI on Monday saw Pakistan narrowly lose in what was a low scoring encounter.
Before today’s win, Pakistan had not won an ODI in Australia since January 2017 when the then captain Mohammad Hafeez had inspired the side to a rare victory.
Rizwan equals world record with 6 catches, drops the 7th
It was also busy and productive day behind the wickets for captain Rizwan, who grabbed a world record equalling six catches and could have had a seventh in the end, only for him to drop a skier offered by Adam Zampa off the bowling of Naseem Shah in the 34th over.
He now shares the record with eight others, one of which is compatriot Sarfaraz Ahmed.
Legendary Australian wicketkeeper Adam Gilchrist grabbed six catches in an ODI innings the most number of times, with four such entries to his name.