In the last quarter of the 6th century AD the Pallava king Sinhavishnu rose to power and conquered the area between the rivers Krishna and Cauveri. His son and successor Mahendravarman was a versatile genius, who unfortunately lost the northern parts of his dominion to the Chalukya king, Pulekesin II. But his son, Narsinhavarman I, crushed the power of Chlukyas. The Pallava power reached its glorious heights during the reign of Narsinhavarman II, who is well known for his architectural achievements. He built many temples, and art and literature flourished in his times. Dandin, the great Sanskrit scholar, lived in his court. However, after his death, the Pallava Empire began to decline and in course of time they were reduced to a mere local tribal power. Ultimately, the Cholas defeated the Pallava king Aparajita and took over their kingdom towards the close of the 9th century AD.