Afghanistan were given a brutally harsh lesson in their first Test as India thrashed them by an innings and 262 runs inside two days.

The minnows realised a dream when they took to the field for a historic match in the longest format, but they endured a nightmare in Bengaluru - where 24 wickets fell on day two, the most in a day of Test of cricket since 1902.

India bowled the tourists out twice on day two at M. Chinnaswamy Stadium after the top-ranked side were dismissed for 474, Hardik Pandya making 71 a day on from Shikhar Dhawan becoming the first batsman from his country to score a Test century before lunch on the first day.

Afghanistan's frailties with the bat were brutally exposed on Friday, Ravichandran Ashwin taking 4-27 as they were skittled out for only 109 in just shy of 28 overs.

Ravindra Jadeja claimed 4-17 and Umesh Yadav (3-26) took his 100th Test wicket as Asghar Stanikzai's men were rolled over for just 103 second time around in a total mismatch, India claiming their biggest innings win.

Afghanistan had fought back well in the final session on their first day of Test cricket, but Pandya and Ashwin extended their seventh-wicket stand before Yamin Ahmadzai - the pick of the bowlers with figures of 3-51 - removed the spinner.

The dangerous Pandya struck 10 boundaries in a composed knock and Yadav clattered Wafadar for a couple of big sixes in an over, the runs coming a little too easily for India after they had resumed on 347/6.

Rashid Khan wrapped up the innings by trapping Ishant Sharma leg before and it did not take long for the top-ranked team to set about ripping through the tourists.

Pandya ran Mohammad Shahzad out with a direct hit and Ishant (2-28) got one to nip back in and clean up Javed Ahmadi, who was soon joined in the pavilion by Rahmat Shah, trapped in front to become Yadav's 100th Test victim.

The probing Ishant bowled Afsar Zazai through the gate before Ashwin got in on the act, a lack of application and poor technique seeing Afghanistan fold, with Rashid and Ahmadzai holing out when trying to launch the wily spinner out of the ground.

Mohammad Nabi top scored with 24 as the Test new-boys just about reached three figures and they were teetering on 24-4 in their second innings following a devastating early burst from Yadav.

Nabi fell for a duck second time around after being promoted to number four, Yadav sending him on his way lbw following a review during a spell which saw four wickets fall for only five runs.

Hashmatullah Shahidi dug in for an unbeaten 36, but the craft of Jadeja and some poor shot selection saw a non-contest of a Test end in a flash.