The veteran right-hander survived 126 deliveries, while Laxman lasted 16 more without being dismissed.
Less than six overs later, the light was offered to Laxman and Sourav Ganguly.
Laxman and Dravid, proud sportsmen both, may well announce their retirement sooner than expected.
Mendis added the wickets of Rahul Dravid, Harbhajan Singh and Zaheer Khan to his capture of Laxman.
But Sachin Tendulkar (47) helped India towards safety before VVS Laxman (59no) and Sourav Ganguly finished the job.
Dinesh Karthik, Mahendra Dhoni and VVS Laxman were all dismissed cheaply for the second time in the game.
Three Laxman boundaries made it 130-3 at tea, with 35 overs to go.
He had promoted VVS Laxman up the order and the batsman repaid the faith with a staggering match-winning 281.
Rahul Dravid was out shortly after for 74 but Sachin Tendulkar (53) and VVS Laxman (62) piled on further runs.
Tendulkar and Laxman picked up where their predecessors at the crease had left off, albeit at a slightly slower run-rate.
Tendulkar was an early Damien Fleming casualty for three, then Brett Lee bagged opener Venkat Laxman for an identical score.
Jacques Kallis (10) top-edged a catch to Laxman and Ashwell Prince and Jean-Paul Duminy were trapped lbw off successive deliveries.
Coming in ahead of the midsummer arrival of VVS Laxman, Prince hit 497 County Championship runs in five matches at 62.12.
Laxman, whose confidence must have been dimmed a little following his duck in the first innings, instantly looked composed and patient.
Laxman made his highest score in England, sharing a fourth-wicket stand of 76 in 30 overs with Yuvraj Singh who made 31.
Tendulkar and VVS Laxman (42 not out) did the most to repel the Australians as 10 overs were lost to bad light.
In a dramatic finale, Laxman and last man Pragyan Ojha held their nerve to see India to the victory target of 216.
K. Laxman, became well-known as a cartoonist on the Times of India.
India captain Mahendra Singh Dhoni paid tribue to Laxman, who was batting at number seven after injuring his back during Australia's first innings.
The only flaw in his innings came on 60 when he edged a chance to VVS Laxman at first slip, which was dropped.
Among his victims was India skipper VVS Laxman, who hung around for almost three hours for 31 before being caught by Jean-Paul Duminy.
Fortunately for India, Tendulkar had all but made the game safe and that allowed Laxman and Ganguly (32 not out) to open their shoulders.
The home side had appeared on course for a win when Laxman and Sharma took the score past 200 in a partnership of 81.
The duo looked to have ridden out the storm when a pearler from Asif, almost a rapid off-break, beat Laxman's defences to hit middle-and-off.
BBC: Akmal continued his superb recent form to defy the Indians
With Tendulkar, former captains Rahul Dravid and Sourav Ganguly, and VVS Laxman all in their mid-30s, there have been calls for the introduction of some younger talent.
That brought Laxman to join Sachin Tendulkar at the crease and for a time the veteran duo looked to be steering India back into contention.
Sensing that he was running out of partners, Laxman went on the offensive, cutting and driving to the boundary to keep the scoreboard ticking over.
He bowled Shahid Afridi for six as the opener wafted across the line and then had Yosuf Youhana caught at slip by Laxman for two.
The pair put on 129 for the second wicket to guide Lancashire to a strong position of 140-1 following the early loss of VVS Laxman.
Paceman Mervyn Dillon earlier took a Test-best 5-71 as India lost their last six wickets for 44 runs despite a fighting, unbeaten 65 by Vangipurappu Laxman.
应用推荐