One detail that supports both the ideas that Machu Picchu was a fort and a spiritual center is that it was a citadel and religious center that worshiped the sun god 'Inti'..The stone constructions of Machu Picchu were made in the upper parts to receive the sun's rays, and the most energetic temples were the Temple of the Sun, the Intihuatana, the Intipunku, the Sacred Rock, and the Temple of the Moon. The worship of the sun god and the strategic location of Machu Picchu on a mountain peak suggest that it may have served both as a spiritual center and a fort to protect the Inca Empire from invaders. The fact that Machu Picchu was built in a sacred landscape and contained a sanctuary where the gods were worshiped also supports the idea that it was a spiritual center
Hope this helps you