As it happened: Wallabies scrape home in thrillerAnalysis: Australia cannot win World Cup without PocockRWC Schedule: When is the Rugby World Cup final?Rugby World Cup interactive: your guide to every teamFull coverage of the 2015 Rugby World Cup
LONDON: A Bernard Foley penalty goal wrenched Australia's World Cup campaign from the jaws of death in a thrilling 35-34 victory over a magnificent Scotland at Twickenham on Sunday.  
The Wallabies will play Argentina in the World Cup semi-final this weekend but not before Australia regain their composure after the narrowest of escapes against the Scots.
The win will be debated for days to come, with commentators divided on the validity of the defining penalty. Referee Craig Joubert awarded an offside penalty to Australia in the 79th minute but Scotland captain Greig Laidlaw said Joubert should have gone upstairs to the television match official. 
"They go to the TMO for everything else, it was such a big decision, why wouldn't you go to the TMO for that," Laidlaw said. 
The look on coach Michael Cheika's face said it all as his No.10 lined up to take the 80th minute shot at goal. On that moment rested all of the newfound optimism in Australian rugby. 
Had it drifted, like Foley's first three kicks of the night, the Wallabies would have been on a plane home within 24 hours in a cloud of regret and disbelief. 
The penalty came minutes after James Slipper gifted Scotland what appeared to be the match-winner with a horror intercept in the shadows of the woodwork.
But Australia live to fight another day at the World Cup, with five tries to Scotland's three and the composure when it counted. 
"We've given ourselves a shot ... we're still alive for next week. It wasn't pretty out there but we did enough," winger Drew Mitchell said.
"Having said that I feel for Scotland, it's never easy to go out like that, for it to come down to those fine margins. I feel for those guys." 
Mitchell bagged a double in the 80-minute roller coaster, which saw the scoreline see-saw with each passage of play. 
Playing without lynchpin starters David Pocock and Israel Folau, the Wallabies put the injuries behind them to explode out of the blocks in a 10-minute flurry of pace and power. 
Fijian-born centre Tevita Kuridrani shook off a hitherto quiet World Cup campaign to put Adam Ashley-Cooper away for his 34th Test try in the ninth minute. 
Kuridrani took a wide ball from No.10 Bernard Foley and brushed off one tackler to slice through two more defenders and pass to his winger, who waited on the right wing.
Foley couldn't add the extras and Scotland halfback Laidlaw put his side on the scoreboard to make it 5-3 14 minutes in. 
The Australian defence was caught napping when inside centre Peter Horne scored off the ruck while forwards Rob Simmons and Scott Sio stood waiting for someone else to come off their mark. 
Laidlaw converted to make it 10-5 and a penalty put them eight points in front in the 21st minute as the underdogs refused to follow the script. 
Australia's ball carriers stepped up to work through 14 phases on Scotland's line before fullback Beale looked wide to find Mitchell on the wing with a superb cut out pass. The veteran winger bolted over to make it 13-10. 
Foley missed his second shot at goal, the sideline conversion drifting just wide, leaving the Wallabies trailing 13-10 and a penalty against young loosehead Scott Sio gave sharp shooter Laidlaw the chance to widen the gap to six points. 
It looked as though a Scottish uprising was unfolding at Twickenham, as error after error turned Australian possession into Scottish opportunity. 
But the Wallabies regrouped and scored just on half time, ignoring the absence of maul specialist No.8 David Pocock to send Michael Hooper over in the same fashion instead.
Foley's off-night continued with his third consecutive missed shot at goal, leaving the Wallabies trailing 16-15 at the break. 
But a yellow card to Quade Cooper's cousin, Sean Maitland, for a tough deliberate knock-on, gave the Wallabies their best chance to take the lead for the first time since the 14th minute. 
Captain Stephen Moore directed Foley to kick for the corner and the Australian forwards deployed the maul for a second time to exploit the overlap. Halfback Will Genia fired off a pass to Mitchell and the Toulon winger bolted over to score. 
Foley converted - his first success of the night - to put Australia up 22-16, before a Laidlaw closed the gap to three points with a penalty goal minutes later. 
The Wallabies had their tails up and appeared to score with another Kurtley Beale pass wide to Ashley-Cooper, but video replays revealed a Genia knock-on at the ruck. 
Sio limped off the field with a shoulder or neck injury in the 51st minute before a Foley penalty goal put the Wallabies up 25-19. 
Any pretensions of comfort were shattered when Scotland No.10 Finn Russell charged down a kick from Foley and winger Tommy Seymour finished off the job in the 59th minute. 
Kuridrani asserted himself to break through a two-defender tackle and plant the ball over the line five minutes later and Foley added the two points to put Australia up 32-24. 
Laidlaw closed the gap to five points with 10 minutes to play and as rain pelted down at Twickenham a Mark Bennett try levelled the scores.
The conversion looked to have put victory beyond reach for Australia.  
But in one of the great escapes of Australian rugby, Foley pulled off the greatest kick of his career to date to ensure the Wallabies dodged sudden death to fight another day at Twickenham. 
Argentina await.