Cook and Pietersen dominated the Bangladeshi attack with a wide range of shots, adding 170 for the third wicket. The England captain cracked two sixes and 14 fours in the 244-ball knock for his 11th Test hundred.
Pietersen, struggling against spin on the tour before this match, smashed one six and 15 fours in his 135-ball knock before missing out on his 17th Test hundred, bowled by left-arm spinner Abdur Razzak.
Bangladesh's decision to put England in to bat after winning the toss backfired as they struggled for wickets throughout the day on a slow pitch despite introducing spin after seven overs.
Pietersen, who made just 41 in three one-dayers and 22 in two innings of a practice match recently, batted fluently against spin as he once hit Shakib Al Hasan for two fours and a six in one over.
Cook reached his hundred in style, slog-sweeping spinner Mohammad Mahmudullah over mid-wicket for a six. He added 72 for the opening wicket with debutant Michael Carberry (30) and 77 for the next with Jonathan Trott (39).
Trott looked surprised when given caught behind while attempting to hook seamer Rubel Hossain. TV replays later suggested the ball had come off the helmet.
Left-handed Carberry outscored Cook in the early part of the partnership as he began with a flurry of boundaries, driving Rubel for three fours in an over.
Bangladesh's lone success in the morning session came when Carberry was trapped leg-before by Mahmudullah while attempting to sweep.
Carberry was dropped by wicket-keeper Mushfiqur Rahim off Mahmudullah when on 30, but failed to capitalise on the chance as he fell in the bowler's next over.
|England 1st innings|
|A. Cook||not out||158|
|M. Carberry||lbw b Mahmudullah||30|
|J. Trott||c Rahim b Rubel||39|
|K. Pietersen||b Razzak||99|
|P. Collingwood||not out||32|
|Extras||b4, lb3, nb7, w2||16|
|Total||for three wkts in 90 overs||374|
|Fall of wkts||1-72, 2-149, 3-319|
|Shahadat 12-2-50-0 (nb2, w2), Rubel 13-0-79-1 (nb5), Shakib 21-2-80-0, Naeem 11-1-38-0, Mahmudullah 14-1-45-1, Razzak 17-1-71-1, Ahmed 1-0-2-0, Tamim 1-0-2-0|
Source: AFP South Asian Edition