In another high-scoring match in which a total of 646 runs were made, Pakistan notched up 329 for six, largely due to a blazing 80 in 58 balls by Shahid Afridi on his return to international cricket. India chased the stiff target till the 49th over before being all out for 317 to leave the two teams tied 1-1 in the five-match series.
Tendulkar made a brilliant 141 in 135 balls with the help of 17 fours and one six but his valiant effort went in vain. This was the first century by an Indian on Pakistani soil and the highest by the batting genius against the archrivals.
India were in the hunt till the 45th over but they lost Yuvraj Singh, Mohammad Kaif and Zaheer Khan in the space of six balls to tilt the balance in Pakistan's favour. Kaif and Zaheer were dismissed off successive balls by local hero Shoaib Akhtar in the 46th over.
A great fightback by Ramesh Powar who scored 18 off 11 balls and Lakshimathy Balaji (14 off 10 balls with 3 fours) again brought India back into contention as they reduced the equation to 15 off 12 balls. But Balaji was run out while trying to steal a single off Mohd Sami.
When Mohammad Sami clean bowled last man Ashish Nehra, batting with a bandaged arm, off the third ball of the penultimate over, the packed stands of the Rawalpindi Cricket Stadium erupted into celebrations. The third match of the series would be played in Peshawar on Friday.
The Indian innings got off to a fairly brisk start with Sehwag playing with the customary flourish although the Pakistani new ball operators managed to generate some pace under the floodlights.
Shoaib's first over cost seven runs while Shabbir Ahmed, back in the team after a hand injury, was hit for a rasping boundary in his second over.
Tendulkar appeared to be a little subdued in the initial stages but gradually opened up after chipping Shoaib over the slips cordon for a boundary in the third man region.
The Indian openers stitched 56 runs in 8.1 overs before Shoaib drew first blood by sending Sehwag's off-stump cartwheeling with a ball that kept slightly low. Sehwag's cameo knock of 26 came off 21 balls and contained four boundaries.
The home team struck again three overs later when speedster Mohammad Sami sent back the stylish VVS Laxman cheaply to reduce India to 71 for two. Laxman was trapped leg before wicket to an incoming delivery.
But Tendulkar, who grew in confidence as the innings wore on, and captain Sourav Ganguly steadied the ship by not taking too many risks and keeping the scoreboard moving with gentle pushes and nudges.
The Indian captain could have returned to the pavilion without opening his account had Shoaib not dropped a straight forward catch at mid-off with Shabbir Ahmed being the unlucky bowler. Ganguly celebrated the stroke of luck by flicking the bowler to the fine-leg for a boundary two balls later.
The little master was prompt in dispatching the loose balls to the fence and completed 13,000 runs in One-dayers when he took a single off Sami.
Tendulkar gave glimpses of his vintage form as he produced a barrage of exquisite strokes on both sides of the wicket while his captain was quite content in playing second fiddle.
The duo added 69 runs for the third wicket before the left-hander fell to a rash shot as he stepped out to Shahid Afridi but missed the ball completely and Moin Khan whipped off the bails after an initial fumble. Ganguly's patchy knock of 15 came off 38 balls.
The Indian run chase picked up tempo after the arrival of in-form Rahul Dravid who was on the look out for runs from the word go and kept rotating the strike to unsettle the Pakistani bowlers in company of Tendulkar.
Tendulkar placed the ball to the third man region and took a single off Shoaib to notch up his 37th One-day century before a standing ovation from the capacity crowd.
With the asking rate climbing after every over, Tendulkar stepped up the pace of scoring, spanking spinner Shoaib Malik for a number of boundaries. But his belligerent knock ended when he tried to lift the same bowler over the deep mid-wicket boundary where Razzak held on to a well-judged catch. Dravid soon followed him to the pavilion as he inside edged a Sami delivery onto his stumps for 36.
Earlier, electing to bat, the Pakistani innings got off to a blazing start as Yasir Hameed (86) and Afridi plundered runs at will against the Indian new ball bowlers who got absolutely no assistance from the track.
The right-handed Afridi was in particularly devastating mood as he produced a barrage of shots against Balaji and Zaheer Khan, much to the delight of a capacity crowd who cheered every run of the home team.
The hosts reached the 50 mark in just 6.2 overs as Afridi singled out Zaheer for special treatment, lifting the left-armer for a huge six over midwicket and flicking him to he fine leg boundary one ball later. Zaheer conceded 15 runs in that over and his first spell of four overs yielded 38 runs.
After Afridi was bowled by part-timer Yuvraj Singh, Hameed took over the responsibility of scoring the runs before he was run out for 86, an effort which came off 108 balls and contained nine fours and a six. Although Yousuf Youhana (24), Inzamam-ul-Haq (29) and Younis Khan (28) got the starts, they could not capitalise. But some lusty hittings by Shoaib Malik (30 not out) and Abdul Razzak (31 not out off 18 balls) powered Pakistan to a huge 329 for six in their allotted 50 overs.