Ben Hilfenhaus put Australia on top with the ball after Ryan Harris sparked a remarkable comeback with the bat in the first Test against the West Indies in Barbados.
At stumps on day four, the Windies were 5-71, leading by 114 runs with five wickets remaining in their second innings.
Peter Siddle (1-11) claimed the vital wicket of Darren Bravo (32) in the closing overs of the day after a 50-run stand between the left-hander and Narsingh Deonarine (20no) to ensure Australia go into the last day's play chasing a win to go 1-0 up in the three-Test series.
The tourists could have reached stumps on even more of a high but Carlton Baugh (2no) survived an LBW appeal which was reviewed by Australia when he padded up to Siddle in the last over of the day.
Australia's position of strength hardly seemed likely midway through Tuesday's opening session, as three quick wickets left the tourists 8-258 in their first innings and staring down the barrel of a 150-run plus deficit.
But Harris engineered a remarkable turnaround, scoring his maiden Test half-century and adding 121 runs with tail-enders Ben Hilfenhaus (24) and Nathan Lyon.
The Queenslander ended with an unbeaten 68 when Michael Clarke called time on Australia's innings a half-hour before tea, the tourists ending on 9(dec)-406 to be behind by 43 runs.
"We've done it pretty much all summer so it was just very important for us to get out there and make runs today and get as close as we could to the total," Harris said.
"And that's what we did. Everyone, Hilfenhaus and even Lyon, we all worked together and got us close.
"We just want to win the Test match."
Harris shared an unbroken stand of 77 with last man Lyon, who also hit a career-best 40 not out to guide Australia from danger.
That position then turned to one of potential victory as Hilfenhaus (3-17) ran through the Windies' top order in the 25-minute session before the tea break.
The Tasmanian removed openers Adrian Barath (2) and Kraigg Brathwaite (0) as well as vice-captain Kirk Edwards (1) with just six deliveries to leave the stunned Windies 3-4 at the break.
Harris (1-14) then came in to bowl after tea and took just five deliveries to do what had proven impossible in the first innings, luring Windies linchpin Shivnarine Chanderpaul (12) to edge a catch to delighted wicketkeeper Matthew Wade as the hosts slumped to 4-17.
"Whatever's given to us, providing we've got enough time, we'll definitely chase - we want to win this," Harris said.
The final day's play begins at 9.50am on Wednesday (11.50pm AEST).
-AAP