Overnight batsman Ravichandran Ashwin made 113 as India posted 376 all out on day two of the first Test against Bangladesh in Chennai on Friday.
Fast bowler Hasan Mahmud finished with figures of 5-83 after he rattled the Indian batting on day one.
A 199-run seventh-wicket stand between Ashwin and Ravindra Jadeja, who hit 86, led the hosts' fightback.