Harshavardhana ruled northern India from 606-647 AD after becoming king at age 14. He faced early challenges from neighboring kings but conquered much of northern India, establishing an empire that stretched from Bengal to Punjab. His greatest military achievement was a stalemate against Pulakesin II of the Chalukyas after two years of fighting. Harshavardhana strongly supported education, reserving a quarter of the empire's income for the renowned Nalanda University, which had over 10,000 students during his reign. The Chinese pilgrim Xuanzang visited India during Harshavardhana's rule and studied at Nalanda before returning to China and writing an account of his travels