Skipper Ricky Ponting and opener Matthew Hayden took champions Australia closer to victory on Wednesday after their early scare against bottom-ranked Bangladesh in the first Test.
Ponting was batting on 72 at stumps on the fourth day with first-innings centurion Adam Gilchrist on six as Australia reached 212 four, 95 short of a win.
The tourists lost three wickets towards the end of the day's play after Hayden (72) had ensured a steady start but Ponting was immovable.
His innings has so far lasted 169 balls, during which he hit seven fours.
Despite conceding a shock 158-run first innings lead, the Aussies showed the mettle of the world's top team. They struck back by dismissing the home side for a meagre second-innings 148 and then batted sensibly in their final innings.
Hayden played a vital role, adding 64 with the other left-hander Michael Hussey (37) and then figuring in a crucial 111-run stand with Ponting.
He struck eight fours and a straight six off left-arm spinner Mohammad Rafique during his 152-ball knock and also went for some quick singles in a bid to keep the pressure on the fielders.
In the end, it was one such single to mid-on that ended Hayden's innings as Enamul Haque made a direct throw to the bowler's end.
Ponting continued to graft for his runs even as Damien Martyn (seven) and Michael Clarke (nine) went cheaply against a probing bowling attack led by Rafique, who got both scalps.
Australia, who have won both their previous Tests against Bangladesh by innings margins, had bounced back from their first innings deficit to reduce Bangladesh to 124-5 on the third day.
Shane Warne and Jason Gillespie dismissed the remaining batsmen for just 24 runs on Wednesday morning.
Paceman Gillespie struck the first blow when Khaled Mashud (zero) was bowled offering no stroke to a ball that nipped back sharply.
Gillespie also dismissed the other overnight batsman Rajin Saleh (33) before leg-spinner Warne grabbed three quick scalps after going wicketless in the match so far.
"I am not bowling as well as I would like to, but it was satisfying to help the team in a tricky situation," said Gillespie.
"The match is not yet over and one should give full credit to the Bangladeshi players for putting up such a stiff fight," he added.
Warne had revenge on Rafique, trapping the left-hander leg-before after being whacked for three fours in the previous over, and then bowled Mashrafe Mortaza with his next ball.
Last man Haque (zero) was also trapped leg-before by the world's leading wicket-taker as the home side lost the initiative with an all-too familiar second-innings collapse.
Warne and Gillespie finished with three wickets each, Gillespie conceding just two runs for his two wickets on Wednesday morning.
BANGLADESH (1st innings): 427 (Shahriar Nafees 138, Habibul Bashar 76, Rajin Saleh 67, S. MacGill 8-108):
AUSTRALIA (1st innings): 269 (A. Gilchrist 144, Rafique 5-62):
===========================================
BANGLADESH (2nd innings - overnight 124-5):
-------------------------------------------
Javed Omar c Gilchrist b Gillespie 18
Shahriar Nafees b Lee 33
Habibul Bashar run out 7
Rajin Saleh c Hayden b Gillespie 33
Mohammad Ashraful lbw b Clark 4
Aftab Ahmed lbw b MacGill 17
Khaled Mashud b Gillespie 0
Mohammad Rafique lbw b Warne 14
Mashrafe Mortaza b Warne 0
Shahadat Hossain not out 1
Enamul Haque lbw b Warne 0
-------------------------------------------
EXTRAS: (B-10, LB-7, NB-4) 21
TOTAL: (all out) 148
===========================================
FALL OF WICKETS: 1-48, 2-58, 3-66, 4-77, 5-124, 6-128, 7-147, 8-147, 9-147.
BOWLING: Lee 8-0-47-1, Gillespie 11-4-18-3, MacGill 13-4-30-1, Clark 4-2-8-1, Warne 13-4-28-3, Clarke 1-1-0-0.
OVERS: 50
===========================================
AUSTRALIA (2nd innings):
-------------------------------------------
M. Hayden run out 72
M. Hussey b Haque 37
R. Ponting not out 72
D. Martyn b Rafique 7
M. Clarke c Mashud b Rafique 9
A. Gilchrist not out 6
-------------------------------------------
EXTRAS: (B-4, Lb-4, NB-1) 9
TOTAL: (for four wickets) 212
===========================================