Australia has returned to winning ways at the Cricket World Cup, narrowly beating a spirited Pakistan by 41 runs in Taunton.

An emotional David Warner scored his first century back in the Australian line-up as Australia posted a solid, if slightly underwhelming, total of 307, which Pakistan threatened but eventually fell just short of chasing.

The day belonged to Warner, who paid credit to his wife Candice for keeping him focussed during his 12-month ban for ball-tampering.

"My wife is just, she's just my rock. She's unbelievable. She's determined, disciplined, selfless," he said.

"She's a strong woman. And she got me out of bed a lot in those sort of first 12 weeks, and got me back running and training hard as I could … She really nailed that into me."

David Warner was delighted to bring up his first century back in the team. ( AP: Alastair Grant )

Warner admitted that there were times he thought he wouldn't get his chance again on the international stage, but said that if selected, he would always have answered his country's call.

"There was always that going through my mind," he said.

"That's what drove me to keep being as fit as I can and to keep scoring as many runs as I can in the T20 tournaments that I was playing in.

"I was always coming back to international cricket if selected."

Warner also made reference to his lack of comments about the tampering incident, saying he wanted his bat to do the talking.

"I didn't need to say anything," Warner said.

"What was said was said back in those press conferences.

"Now, it's about looking forward."

Collapse hurts Pakistan

A sizable middle-order collapse looked to have completely killed off Pakistan's hopes after a positive start with the bat, with Pat Cummins leading the way with the ball, but a tail-end fightback briefly dragged Pakistan back into the hunt.

They would fall just short though, Mitchell Starc striking twice in 45th over to kill off the game once and for all.

Pat Cummins was the pick of the Aussie bowlers. ( AP: Alastair Grant )

Despite opener Fakhar Zaman falling for a duck off Cummins' bowling, Pakistan started its chase relatively well. Imam ul-Haq looked immediately settled, and when joined by the Babar Azam and his smooth stroke play, Australia's bowlers looked short on options.

Babar looked in supreme touch, making his dismissal — a skied hook shot straight to fine leg on 30 — all the more surprising.

Mohammad Hafeez joined Imam, and the two quickly picked up where Babar left off. With conditions offering the bowlers little support, batting looked easy and the target looked eminently reachable.

Imam went past 50 with a minimum of fuss and then, three runs later, was dismissed out of nowhere. Cummins again, brought into the attack in an attempt to break a stubborn partnership, caught the batsman's glove with a good bouncer and presented Alex Carey with an easy catch.

It was a wicket that changed the game, as was the dismissal of Hafeez soon after. His was even more surprising, holing out off a long hop from part-timer Aaron Finch's nude spin on 46.

Aaron Finch, of all people, made a key breakthrough in removing Mohammad Hafeez. ( AP: Alastair Grant )

Pakistan lost 3-14 in that collapse, and the score became 7-200 when Hassan Ali's (32) big-hitting cameo ended. The end looked imminent.

That was, until Sarfaraz Ahmed and Wahab Riaz combined at the crease and started finding the middle of the bat and the boundary with regularity. From a nearly unlosable position, Australia was suddenly made to sweat as Pakistan made one last late push.

Sarfaraz and Wahab got the equation down to 44 required off 34 balls, before a speculative review of a caught behind shout showed Wahab had got the slightest of edges on a Starc delivery, ending an excellent innings on 45.

Starc then knocked over Mohammad Amir for a duck, Glenn Maxwell ran out Sarfaraz (40) with a flatly remarkable piece of fielding at mid off, and Australia breathed a sizable sigh of relief.

Warner completes his comeback in style

Sent in to bat by Pakistan, Australia hoped to avoid the sort of sluggish start that ended up costing it against India. Fortunately, Pakistan's bowlers obliged.

David Warner and Aaron Finch celebrate the good start against Pakistan. ( AP: Alastair Grant )

Finch and Warner began scoring quickly, either with smart running or with heavy hitting as the likes of Shaheen Afridi and Hassan struggled to hit a consistent length.

Without taking too many risks, the pair eased past 100 in the 17th over and Finch quickly went to his half century. He took a liking to the spin of Hafeez, and in an instant a century looked a formality.

But the reintroduction of Amir — by far Pakistan's best bowler on the day, who finished with 5-30 — did for Finch, the Aussie captain skying an attempted drive on 82.

A middle-order reshuffle saw Usman Khawaja slide down as Steve Smith (10) and then Maxwell (20) both came and went relatively cheaply, while Shaun Marsh joined Warner at the crease with the score at 3-223 with plenty of overs left.

Mohammad Amir was the pick of Pakistan's bowlers with a career-best 5-30. ( AP: Alastair Grant )

Warner remained unburdened by the loss of wickets around him and soon went past 100, bringing back the trademark leaping celebration he had to keep shelved during his 12-month ban. At this point, with Warner firing and Pakistan dropping catches with regularity, Australia looked on track for a truly massive score.

But the innings would rather peter out as a steady stream of wickets meant no batsman was able to really ignite. Warner's excellent innings ended, Khawaja (18) and Marsh (23) hit out briefly and made way, at which point the end came fairly quickly.

Carey tried to work as a lynchpin as he did against India, but he fell for 20, while the tail crumbled around him. In the end, 307 looked short of what Australia was capable of earlier in the innings, but proved to be enough.

See how the action unfolded in our live blog.