Sent into bat, Karnataka batsmen held the fort for most part of the day but lost three quick wickets in the last session.
Pandey, who hit his 16th first class hundred, stitched a 148-run stand with Karun Nair (58) for the fourth wicket after the hosts were 87 for two with Robin Uthappa and Rahul back into the pavilion.
Soon after celebrating his impressive ton, Pandey fell to left-arm pacer Thakur, who disturbed Pandey's stumps. Pandey struck 13 boundaries and a six on way to a 163-ball 104 runs.
However the day ended in disappointment for KL Rahul (21), who was making a comeback after an injury which he had sustained during the Sri Lanka tour. He got a start but could not convert as he was caught by Ravikumar Thakur off Faiz Fazal.
More From This Section
With Karnataka looking in a commanding position with the score reading 266 for three in the post-tea session, the hosts lost three quick wickets by adding a paltry 32 runs.
The late-day wrecker was Thakur who packed off Pandey and Nair off successive deliveries in different overs - 79th and 81st overs.