Gautam Gambhir hit a patient half-century to help India draw the third and final Test and end the three-match series at 1-1 against South Africa, on Day 5 at Newlands in Cape Town, on Thursday.
Chasing 340 for victory, India were 166 for three in 82 overs before the two teams agreed for a draw.
Sachin Tendulkar was unbeaten on 14 from 91 balls, while VVS Laxman was not out on 34 from 67 balls with the help of four boundaries as India managed to bat out the final day for the loss of just three wickets.
Gambhir, struggling with an injury on his left hand, battled hard to score 64 from 184 balls to register his second fifty of the match, before he was caught down the leg side off Dale Steyn. The left-hander was involved in two slow partnerships to boost India's chances of drawing the match. He added 79 runs in 221 balls for the second wicket with Rahul Dravid, who made 31 from 112 balls and then put on 14 from 82 balls for the third wicket with Tendulkar.
Jacques Kallis shone with the bat for South Africa as he hit two centuries in the match, while Tendulkar came to India's rescue with a fluent innings 146 in the first innings.
Harbhajan Singh shone with the ball, claiming seven wickets for 120 in 38 overs, his 25th five-wicket haul in Tests, but the rest of the bowlers failed to make an impact.
The pacers made most of the conditions early on in the match with Dale Steyn claiming five wickets while S Sreesanth took five for 114 in 29 overs.
Morning session: (53 runs, 28 overs, 1 wicket)
India looked content to play out the opening session with minimum damage and they achieved just that by losing only one wicket.
Gambhir, who was already suffering from an injury in his left hand, got off to a painful start when a sharp rising delivery from Morkel hit him on the elbow and went over the slips for a four.
South Africa tried to unsettle Gambhir by bowling a lot of short deliveries directed at his body, with the new ball, while they pitched it up to Sehwag.
Gambhir got his second boundary when he flicked a full delivery from Steyn through the square leg region, in the fifth over.
Sehwag was very watchful and keen to play out the new ball. He took 25 deliveries to get his first boundary thumping a short delivery from Steyn through the covers.
After ten overs, India were 22 for no loss, with both openers not willing to take any risks and looking to leave as much as possible outside the off-stump.
Lonwabo Tsotsobe was unlucky not to have picked the wicket of Sehwag in his first over. The Indian opener (11) went after a short, wide delivery but was dropped by substitute fielder J P Duminy at point region, kept slightly deep.
But Sehwag didn't profit from that lifeline. He fell in the very next over when he edged an outgoing delivery from Morkel and was caught by Graeme Smith at first slip after a patient 11 from 40 balls.
The onus now lay on veteran Rahul Dravid, playing his 150th Test; thus far he has scored just 89 runs in five innings in the series.
Gambhir got his third boundary when he clipped a full delivery from Tsotsobe through square leg, in the 15th over.
Left-arm spinner Paul Harris troubled Gambhir right from the start as he pitched on the footmarks and got the ball to turn and bounce a great deal.
Just like was the case with South Africa's second innings, once the ball lost its shine it got a bit difficult for the bowlers to make an impression. And with Dravid and Gambhir intent on defending, South Africa's bowlers were made to toil extra hard to force the batsmen into committing mistakes.
After a quiet spell, Gambhir finally broke the shackles by stepping down the wicket to Harris and driving him through cover for a four, the first boundary after nearly 11 overs.
At lunch, India were 53 for one in 28 overs, still needing another 287 runs for victory.
Despite the injury, Gambhir showed great determination and was unbeaten on 32 from 80 balls, while Dravid, who was content defending, was on eight from 49 balls.
Morkel got the only wicket of the session but bowled a splendid spell, beating the bat on numerous occasions. Similar was the case with Steyn.
Another good session with the bat and India could well be inching towards a hard-earned draw in the final Test.
Post lunch session: (61 runs, 28 overs, 1 wicket)
India continued to defend. Gambhir led the way with a patient half-century. Slowly, but steadily, India were inching towards a draw, having lost just one wicket in the post-lunch session.
Smith continued after the lunch break and gifted Gambhir a full toss that he despatched down the ground for a four. Even Dravid helped himself to another four when he cut a short delivery through point in Smith's next over, forcing him out of the attack.
Gambhir also looked to lift the tempo after the break and hit a boundary each in successive overs off Steyn to move to 48.
The duo continued to frustrate the hosts with some steady batting as they brought up their 50-run partnership for the second wicket off 136 balls.
In the next over, Gambhir brought up his half-century from 103 balls when he cut a short delivery from Steyn through the point region.
With the pacers unable to make an impact and Harris getting plenty of purchase, Smith brought himself back on. But the move backfired as India broke the shackles somewhat with three boundaries in that over. Dravid drove him twice through the covers for two fours, while Gambhir despatched a full toss through mid-on, in the 43rd over.
Dravid, on 27, got a lifeline when he was struck right in front of the stumps by Harris but the umpire turned down the huge appeal.
But he was unable to make the most of that reprieve. He edged an outgoing delivery from Tsotsobe and was caught at third slip after a patient knock of 31 from 112 balls; he added 79 runs in 221 balls for the second wicket with Gambhir.
With 40 overs remaining in the day, South Africa still had time on hand to scalp the remaining eight wickets, while India were just hoping for survival.
Gambhir (62) also got a reprieve when his leading edge off Harris was dropped by AB de Villiers at silly point, in the 50th over. Harris then saw another catch being spilled, and once again it was de Villiers, who made a valiant attempt at leg slip but failed to hold on as Tendulkar got a thin inside edge.
At tea, India were 114 for two in 56 overs, still needing another 226 runs for victory. It looks unlikely they will push for it in the final session.
Gambhir continued to resist the South African bowlers as he scored 62 from 163 balls, while Tendulkar also adopted a defensive approach for seven from 22 balls.
Post tea session: (52 runs, 26 overs, 1 wicket)
In the end, it turned out to be a boring final session as India held on for a deserved draw.
South Africa started with Steyn and Morkel after the tea break hoping for an early wicket to force the issue, but the Indian batsmen continued to defend.
Steyn provided the important breakthrough when he got the wicket of Gambhir, who was caught down the leg side by Boucher off a short delivery. The left-hander, who was nursing an injured left hand, toiled hard to score 64 from 184 balls and stayed at the crease for 271 minutes.
But that was the only success for the hosts in the session as the Indians continued to defend resolutely.
Left-arm spinner Harris kept toiling from one end and occasionally troubled Tendulkar and VVS Laxman when he pitched on the footmarks, but still another wicket was hard to come.
The left-arm spinner kept bowling maiden over after maiden over as he conceded just 29 runs in 30 overs, inclusive of 19 maiden overs.
Laxman got a loud cheer when he flicked Morkel through the fine leg region for his first four and also the first after a long wait of 22 overs.
While Tendulkar was yet to hit a boundary after facing 75 balls, Laxman provided the Indians fans something to cheer at. The stylish right-hander hit Tsotsobe for two consecutive boundaries through the vacant cover region, in the 75th over.
South Africa made one last effort as they took the second new ball after 80 overs and called on their two best bowlers in Steyn and Morkel. But after a couple of overs with the new ball, the two teams agreed for a draw.
When the match ended, India were 166 for three in 82 overs, having hit just 19 boundaries through the day while scoring at just over two runs per over.
The three-match series ended in a 1-1 draw and India proved they were the deserved No. 1 team in the world.