 The main access route to Ollantaytambo runs along a narrow valley formed in the mountains by the Urubamba River , which connects the site with Machu Picchu to the west and with Pisaq and Cusco to the east . After his uprising , Manco Inca fortified the eastern approaches to fend off attacks from the former Inca capital , now under Spanish occupation . The first line of defense was a steep bank of terraces at Pachar , near the confluence of the Anta and Urubamba rivers . Behind it , the Incas channeled the Urubamba to make it cross the valley from right to left and back thus forming two more lines backed by the fortifications of Choqana on the left bank and ' Inkapintay on the right bank . Past them , at the plain of Mascabamba , eleven high terraces closed the valley between the mountains and a deep canyon formed by the Urubamba . The only way to continue was through the gate of T 'iyupunku , a thick defensive wall with two narrow doorways . In the event of these fortifications being overrun , the Temple Hill , a religious center surrounded by high terraces overlooking Ollantaytambo , provided a last line of defense . 
