(CNN) -- Rahul Dravid and Mahendra Singh Dhoni put Sri Lanka's inexperienced attack to the sword by smashing centuries as India regained the advantage on the opening day of the first Test match in Ahmedabad.

Dravid became the fifth-highest Test run scorer in history with a stunning 177 not out, putting on 125 for the fifth wicket with Yuvraj Singh (68) and a 225-run stand with Dhoni (110) as India reached a commanding 385 for six at stumps

Earlier, Sri Lanka had started brightly with Chanaka Welegedara claiming three wickets in his first four overs with the new ball to leave the hosts reeling at 32 for four.

Welegedara, playing only his second Test match, exploited the moisture in the pitch in the morning to prise out Gautam Gambhir, Virender Sehwag and Sachin Tendulkar cheaply.

Dammika Prasad, who had shared the new ball with Welegedara, added to the destruction by bowling VVS Laxman via an inside edge as India crumbled.

However, Dravid was then joined at the crease by Yuvraj and the pair pieced together India's recovery.

Although Yuvraj was watchful once master spinner Muttiah Muralitharan was introduced, the runs flowed steadily.

Dravid even clubbed left-arm spinner Rangana Herath for a rare six and reached his half-century off just 79 deliveries.

Sri Lanka captain Kumar Sangakkara was forced to do without frontline bowlers Thilan Thushara and Nuwan Kulasekara through injury and the inexperience of Prasad and Welegedara -- the two have played only four Tests between them -- gradually emerged.

Muralitharan finally ended the partnership in the afternoon session by snaring Yuvraj. The left-hander stepped down the track but only managed an inside edge which ballooned off the pad straight to Tillakaratne Dilshan at cover.

If Sri Lanka expected some respite thereafter it failed to transpire. Dhoni quickly hit his stride, maintained the momentum and accelerated nicely in the final session to ensure his decision to bat first would count despite the early carnage.

Dhoni did offer a couple of chances however. An edge just after he had reached his half-century flew past wicketkeeper Prasanna Jayawardene and Mahela Jayawardene at a nice height and a good shout for lbw was turned down by umpire Tony Hill.

Sri Lanka then took the second new ball with just eight overs remaining in the day, but Dhoni reached his second Test hundred with a boundary, his ninth, off Herath.

Dravid by then had gone past 150 and later went past 11,000 career runs in Test cricket.

Dhoni fell with just under three overs left, top-edging Prasad to Prasanna, but Dravid and Harbhajan Singh saw off the last few deliveries without further blemish.