If you visit Machu Pichu, you will have to pass through Ollantaytambo, if only by train. It is 45 miles by road northwest of the city of Cusco and on the rail line to Machu Pichu. It is located at an altitude of 2,792 metres (9,160 ft) above sea level in the district of Ollantaytambo, province of Urubamba, Cusco region in the Sacred Valley. During the Inca Empire, Ollantaytambo was the royal estate of Emperor Pachacuti who conquered the region, built the town and a ceremonial center. At the time of the Spanish conquest of Peru it served as a stronghold for Manco Inca Yupanqui, leader of the Inca resistance. Today, located in what is called the Sacred Valley of the Incas, it is an important tourist attraction because of its Inca ruins and its location, which is close to one of the most common starting points for the four-day, three-night hike known as the Inca Trail.