Australia survived a second half comeback attempt by Samoa to beat the South Pacific Islanders 34-15 Saturday in the teams' final test match before the Rugby World Cup.
The Wallabies led 22-3 at halftime before Samoa scrumhalf Dwayne Polataivao scored two second half tries to bring the visitors within seven points with less than 20 minutes to play.
But Dane Haylett-Petty and Matt To'omua — after the siren — scored late tries to give Australia the edge and prevent another upset by the Samoans, who beat Australia 32-23 in 2011 in their last meeting.
Captain David Pocock, playing his first test match since last November due to a calf injury, plans to retire from test play after the World Cup.
The stand-in Wallabies captain made four carries for 14 meters and eight tackles - the second-most of any Australian forward - before being taken off in the 59th minute without any injury concerns.
"It's good to be out there," Pocock said. "It's a tough one and (there were) some really big hits. There's plenty to work on there. They put us under pressure and a couple of things at scrum-time we'll work on. I thought we showed some good stuff tonight and we'll leave tomorrow (for Japan) really excited to get over there."
Three other Wallabies were also playing their final test match in Australia before retiring — halfback Will Genia, hooker Tatafu Polota-Nau and prop Sekope Kepu.
The Wallabies scored six tries to two, but after some good passages of play in the first half, they struggled to sustain pressure and produce try-scoring opportunities until deep in the second half.
Australia tested its depth before heading to Japan with only three members of the starting lineup intact following the Wallabies 36-0 loss to New Zealand last month.
Samoa also made its presence felt physically, with five-eighth Bernard Foley receiving one big hit during his disappointing night with the boot. He landed just two of six conversions.
Samoan halfback Scott Malolua, who is in the Queensland Reds Super Rugby squad, left the field in the first half with a dislocated shoulder which could put his World Cup in doubt. Samoa opens against Russia on Sept. 24.
Australia plays its first World Cup match on Sept. 21 against Fiji.
Australia 34 (Adam Ashley-Cooper, Adam Coleman, Dane Haylett-Petty, Marika Koroibete, Lukhan Salakaia-Loto, Matt To'omua tries; Bernard Foley 2 conversions)
Samoa 15 (Dwayne Polataivao 2 tries; Tusi Pisi conversion, penalty). HT: 22-3
Wallabies v Samoa as it happened: