England's hopes of building on their 45-run first innings lead were dealt a serious blow as Shakib Al Hasan grabbed two wickets and young debutant Mehedi Hasan picked up one to leave them 28-3 at lunch on the third day.
Mehedi ended England's confident start in the second innings when he induced an edge from captain Alastair Cook who left for 12 after giving a catch to Mahmudullah at slip.
Shakib trapped Joe Root leg before for one in the next over to take his 150th Test wicket before he had Ben Duckett caught by Mominul Haque at forward short leg for 15.
It was a nice comeback for the Bangladesh all rounder, who put his team in trouble by being dismissed off the second ball of the morning.
Resuming on 221-5, Bangladesh were hoping Shakib, who was unbeaten on 31 overnight, would take them close to England's first innings total.
But he went down the wicket before the dust had settled and paid the price as Jonny Bairstow completed a simple stumping.
Adil Rashid then removed nightwatchman Shafiul Islam for two as Stuart Broad took the catch high on his head at midwicket.
Stokes, who finished with 4-27, had Mehedi leg before for one in the next over before a low catch at slip by Cook ended Sabbir Rahman's effort at 19.
Stokes bowled third debutant Kamrul Islam in the same over to wrap up Bangladesh's innings as the hosts added just 27 runs to their overnight score for the loss of five wickets in 12 overs.