Meanwhile, Sarfaraz vowed Pakistan will put their 5-0 whitewash by Australia in March behind them.
Earlier, sent into bat after the coin landed in Pakistan skipper Sarfaraz Ahmed's favour, Australia were off to a steady start with Warner and Finch helping them to 50 in 10 overs.
Indian captain Virat Kohli tells fans not to set a "bad example" after their booing of Australia's Steve Smith. "It'll have to be wait-and-see what the wicket does first-up".
But first slip Asif Ali dropped Aaron Finch off paceman Wahab Riaz when the Australian skipper was on 26 with the total at 67.
The captain cashed in and with the help of six boundaries and four maximums scored 82 before miscuing an attempted big hit was gobbled up by Hafeez, much to the relief of Amir and the rest of the team. When I was going for a game, it was in my mind to twirl my moustache during the game.
Warner completed his 15th one-day worldwide hundred when an outside edge off Shaheen Shah Afridi flew past slip Asif for his 11th four.
Mohammad Hafeez's moustache has been one of the talking points in the World Cup.
The show, then, belonged to Amir. Australia were so far on top in the first half of the first innings, talk of 350 and 400 rolled easily off the tongue, until a vintage performance from Mohammad Amir curtailed them to 307, his five-for bowling out a side that hadn't lost a single wicket for 22 overs.
"Babar (Azam, who made 30 including seven fours) was playing well and his was a soft dismissal".
Shortly after, Sarfaraz caught Coulter-Nile off a delivery from Wahab in the 47th over.
But left-arm quick Amir, on the ground where he returned to first-class cricket in England in 2016 after completing a spot-fixing ban, dragged Pakistan into the game.
Mohammad Hafeez brought all his experience into play from then on in and along with Imam, steadied the ship with a solid 80-run partnership for the third wicket.
Hafeez said Pakistan's remarkable turnaround in its first two games - the team was bowled out for a paltry 105 by the West Indies in Nottingham - was down to acknowledging their mistakes.
Imam-ul-Haq (53) walked back to the pavilion as Cummins dismissed the batsman.
The Aussies broke free against Shaheen, with Finch hitting him over the deep square leg fence for a six and Warner employing the pull shot to get a four.