Bangladesh openers Tamim Iqbal and Imrul Kayes set about peeling off the records as they set about forcing a draw in the opening Test against Pakistan in Khulna.
Both batsmen hit centuries as they steered the Tigers towards safety with an unbroken first-wicket stand of 273– a Bangladesh Test record for the opening wicket.
That meant that Pakistan’s earlier commanding position, when they were bowled out 296 runs ahead, had almost been completely erased with a day to play.
Tamim was unbeaten on 138 while Kayes, who has now scored centuries in three of his past four Tests, stood alongside him on 132.
They will begin the final day 142 runs behind Test cricket's highest ever opening stand set by South Africa's Graeme Smith and Neil McKenzie, coincidentally against Bangladesh, in 2008.
Pakistan began day four on 537 for five and lost their last five wickets for 91 runs in 21 overs to be bowled out for 628 just before lunch.
Slow left-arm orthodox Taijul Islam limited the damage, polishing off the tail, for figures of 6-163.