The Indratatakabaray was the Angkor's first large man-made reservoir ('tataka' means reservoir). It was built by Indravarman I, immediately after he was crowned in 877, to provide a reliable water supply for his new capital city Hariharalaya.
An immense baray, the Indratataka was the biggest reservoir ever built before his time, being 3.8 kilometres (2.4 miles) long by 800 metres (2,600') wide. Now dry, it could have held about 7.5 million cubic metres (265 million cubic feet) of water during the monsoon season.
Later rulers of Angkor out-built him and made this baray look small.
Indratataka was built as a public service for his subjects, creating an irrigation network for the rice fields. The baray retained water during the monsoon season, and then the water was released during the dry season through a network of canals and channels. The king and his Brahman advisers performed many rituals throughout the year, such as the ritual of rain-making performed before the rice planting season.