(CNN) -- India are poised to build a handy first-innings lead over South Africa after Virender Sehwag and Sachin Tendulkar scored centuries on the second day of the second cricket Test in Kolkata.
The home side, needing to win to level the series and retain their No. 1 ranking in the five-day game, reached 342-5 when bad light halted play early on Monday, having bowled the Proteas out for 296 in the morning session.
Opener Sehwag smashed a scintillating 165 off only 174 balls faced, hitting 23 boundaries and two sixes as he added 249 for the third wicket with Tendulkar.
The veteran Tendulkar extended his world record of Test tons to 47 as he took on the junior role, facing 206 deliveries for his 106.
Sehwag, who was dropped by J.P. Duminy on 47, had threatened South African Jacques Kallis's record for the fastest half-century but suffered a brief lull in run flow before passing the mark in just 41 deliveries.
He and Gautam Gambhir put on 73 for the first wicket in just 9.2 overs before the latter was run out for 25, then paceman Morne Morkel had Murali Vijay caught behind by stand-in wicketkeeper A.B. De Villiers for seven.
India reached lunch at 97-2 and Sehwag raced to three figures in only 87 balls for his 19th Test century as the duo batted through the middle session, going to tea at 232-2.
They both fell late in the day as part-time bowler Duminy removed Tendulkar and fellow spinner Paul Harris dismissed Tendulkar, then paceman Dale Steyn bowled Subramaniam Badrinath for one.
V.V.S. Laxman (9) and nightwatchman Amit Mishra (1) survived until stumps as India extended their lead to 46.
South Africa had resumed on 266-9 after a late collapse on Sunday, and tailenders Morne Morkel and Wayne Parnell added another 30 runs for a final-wicket stand of 35.
Left-arm seamer Zaheer Khan finally ended their resistance, trapping Parnell leg before wicket for 12 in his first over of the day to finish with figures of 4-90.
Spinner Harbhajan Singh claimed three wickets on Sunday.
The Kiwis slumped to 66-3 after Monday's start was delayed by an hour due to wet conditions, but Martin Guptill then added 60 with Ross Taylor (40) and an unbroken 100 with Brendon McCullum to guide the home team safely to stumps.
No. 3 batsman Peter Ingram crashed 42 off 47 deliveries before becoming the second of Rubel Hossain's three victims, but it was Guptill's more measured Test best score of 80 that anchored the innings.
The big-hitting McCullum kept the score ticking over as he celebrated his 50th Test with his 16th half-century, ending the day on 58 from 71 deliveries.