The 25-year-old Cook became the second-youngest batsman after India's Sachin Tendulkar to complete 4,000 Test runs during his 55-ball knock.

"The follow-on was discussed, but we felt this was the best way to win the game," said Swann.

"We are 430 ahead after three days. We lost a couple of wickets at the end which isn't ideal, but with two days to play I think we're in the box seat.

"It was hard work today. The pitch was not really responsive but I kept plugging away in the hope that if I got one, another might follow and so it proved."

Mushfiqur Rahim (79) and Naeem Islam (38) earlier put on a record 113 for the eighth wicket before England ended Bangladesh's late fightback with three wickets off four balls.

Wicket-keeper Rahim and Naeem frustrated England with their defiant knocks but the tourists managed to break the stand, thanks to brilliant fielding by Carberry.

His accurate throw from the deep to wicket-keeper Matt Prior found Naeem short of the crease as the batsman attempted a second run. Swann then ended the innings when he took the last two wickets off three deliveries.

Rahim fell to a superb one-handed catch by substitute James Tredwell at short mid-wicket after cracking 15 fours, while last-man Rubel Hossain was bowled for no score.

Bangladesh's previous best for the eighth wicket in Tests was 87 between Mohammad Ashraful and Mohammad Rafique against the West Indies at Gros Islet in 2004.

"At the moment, it is difficult for us but the match has not ended yet," said Bangladeshi opener Tamim Iqbal.

"You cannot predict in cricket what will happen. We scored more than 400 runs in the fourth innings in a Test against Sri Lanka in Dhaka (in 2008).

"We are not conceding defeat yet, because we know if someone plays an extraordinary innings anything is possible in cricket."

England had chances to break the Rahim-Naeem partnership in the afternoon session, but failed to capitalise on them.

Naeem was on 13 when Swann failed to hold on to a return catch and Rahim on 61 when Paul Collingwood dropped a catch at second slip off paceman Stuart Broad.

Bangladesh lost two wickets in the opening hour after resuming at 154-5, but Rahim and Naeem kept the England attack at bay with their determined knocks.

Paceman Tim Bresnan bowled Tamim (86), who managed to add just five runs to his overnight score. The Bangladeshi opener hit one six and 14 fours in his 124-ball knock.

Debutant paceman Steven Finn bagged his maiden Test wicket when he had nightwatchman Shahadat Hossain (14) caught by Collingwood at second slip.

Rahim reached his fifth Test half-century just before lunch, sweeping Swann to the boundary.