Wales withstood a furious second-half fightback from Australia to seize control of Pool D at the Rugby World Cup with a 29-25 victory on Sunday.

Tries from Wales' Hadleigh Parkes and Australia's Adam Ashley-Cooper kept the first half close at Tokyo Stadium, until a late flurry of Rhys Patchell kicks and a try from Gareth Davies sent the Welsh into the break with a 15-point lead.

Australia clawed its way back into the match with tries from Dane Haylett-Petty and Michael Hooper in the second half, but solid kicking from standoff Patchell — who replaced the injured Dan Biggar with less than half an hour gone — kept Wales in front until the final whistle.

"We played pretty well in the first half and we spoke at halftime about making sure we came out and continued to play," said Wales head coach Warren Gatland. "Australia were really good in the second half and put us under a lot of pressure. They had a lot of the ball, and what's become a typical Wales-Australia clash, going right down to the wire.

"I thought our players showed some great composure. I thought the bench had a real impact as well, and to win is really pleasing."

Wales is now in pole position to win Pool D, having begun the tournament with a 43-14 win over Georgia, and has 10 days to recover before it faces Fiji in Oita on Oct. 9.

Australia, meanwhile, is back in action against Uruguay in Oita on Oct. 5, and head coach Michael Cheika knows his team does not have time to dwell on Sunday's disappointment.

"I think we created a bit more going forward in the second half," said Cheika. "In the first half, we made a few breaks but lost the ball and gave them a few opportunities. We had set-piece dominance and we were rewarded more for that in the second half than in the first half. There were a lot of factors. There wasn't one big reason.

"We certainly created a lot of momentum, but you can't know what's going to happen. You obviously believe in your players. But it wasn't to be."

Australia was missing winger Reece Hodge, who was suspended for three games following what was deemed a dangerous tackle on Fiji's Pecelo Yato in the Wallabies' opening match.

The game was just over 30 seconds old when Biggar gave Wales the lead with a drop goal, and the standoff was again influential for the opening try in the 13th minute. Biggar aimed a high kick toward the corner, and Parkes raced in to collect it above Australia winger Marika Koroibete.

Australia looked set for a long afternoon, but the Wallabies hit back in the 21st minute. Bernard Foley spotted space out wide and smashed a kick over toward Ashley-Cooper, and the winger claimed the ball and streaked past two Welsh defenders before diving over the line.

Wales lost Biggar when he injured his shoulder stopping Samu Kerevi charging for the line in the 28th minute, but Patchell made just as big an impact after coming on to replace him.

Foley cut the deficit with a penalty, but the Welsh again pulled away with two Patchell penalties before Davies sent them into halftime with a sizeable lead after intercepting a pass and streaking away for a try.

Patchell landed a drop goal to start the second half, before a try from Haylett-Petty two minutes later gave Australia a glimmer of hope.

Hooper scored another in the 62nd minute as the Wallabies cut the gap to four points, before Matt Toomua kicked a penalty to move his team just one point behind.

Another Patchell penalty nudged Wales a little further ahead, however, and solid defending took care of the rest to secure the victory for Gatland's side.

"It was just about winning, really," said the coach. "That's how important it was. It wasn't about the knockout stages, we just want to win the match and keep the scoreboard ticking over."