Cook, who struck his second successive century, anchored the innings while Pietersen was the more aggressive partner as the pair frustrated the Indian spinners. Pietersen never allowed the spinners to settle down as he kept the score moving with a flurry of shots.
But the England innings collapsed after the dismissal of Pietersen, with the last six wickets falling for just 56 runs. Pragyan Ojha was the pick of the Indian bowlers with five for 143 while Harbhajan Singh and Ashwin chipped in with two wickets apiece.
India sliced through the England innings after Cook was dismissed. With their efforts, both Cook and Pietersen joined Walter Hammond, Colin Cowdrey and Geoff Boycott who hold the record for the maximum Test tons for England.
The duo's double century-stand assumed more significance after the last eight English wickets fell for 139 runs.
Ojha had figures of five for 143, his second fifer in as many Tests.
Image: Indian team celebrates the dismissal of Englands batsman Bairstow during the third day of the second test in Mumbai on Sunday.