The setting sun seen through the portal leading into the raised apse of the main temple. Although this alignment is precise, it may have been unintentional. If one looks at the aerial photograph below, one can see two other apses in front of this portal. When the walls of these apses, and the exterior wall were still standing, the sunlight would have been blocked out. It has been suggested that the walls could have had openings/windows to let the sunlight pass through. If this was the case, there would have had to be five openings in the walls – all in line with one another!
Another suggestion is that this alignment was made before the rest of the temple was built.
The arrow on top of the aerial photo of Hagar Qim points towards the area where the sun sets on the Summer Solstice.

So as the light of the sun reaches the niche, there had to be openings (the red areas) in the walls of the two apses and the exterior boundary wall of the temple.