Some 50 or 60 miles south of present-day Hanoi, the district of Hoa Lu in Ninh Binh Province was the location chosen by King Dinh Tien Hoang as capital of Vietnam in the late 10th century after years of civil war and a struggle to secede from China's Southern Han Dynasty. It remained so for 41 years, until 1009, when the capital was moved to Thang Long, today's Hanoi. At the village of Truong Yen are two small temples built in the 17th century to honor the first two imperial dynasties of Vietnam: the Dinh, founded by Dinh Tien Hoang, and the Early Le, founded by Le Dai Hanh. The area is one of extensive rice fields amid dramatic limestone mountains, through which the Hoang Long River over time has carved out three caves.