Bangladesh ended Day 4 on 103/3 with 356 more to win as India picked up some crucial wickets before the end of day's play.
Bangladesh had to play 35 overs and ended up losing three wickets.
Bangladesh ended the day at 103/3 with Shakib Al Hasan and Mahmudullah at the crease having lost Tamim Iqbal, Soumya Sarkar and Mominul Haque.
After a seemingly endless spell of spin bowling from Ravichandran Ashwin and Ravindra Jadeja, India now needs 7 wickets on day 5 to beat Bangladesh who are chasing a total of 459.
Having bowled out the visitors for 388, India made a quickfire 159 with a half century from Cheteshwar Pujara and set a target of 459.
R Ashwin (45 Tests) became the fastest to 250 Test wickets beating Dennis Lillee's 36-year old record of 48 Tests.
On the other hand, Rahim became the third wicket-keeper captain to score a Test hundred in India after MS Dhoni (five) and Adam Gilchrist.