This is the Olakaneeshvara temple in Mahabalipuram, Tamil Nadu. It was built by Pallava king Mahendravarman in 630 CE. Apart from being a Shiva temple, it also served another purpose. The temple functioned as a lighthouse to emit light and serve as a navigational aid for ships in the sea. They used oil to kindle up a huge pot which was placed on the square platform at the top of the cave temple. It was kept kindled all night. The burning pot emitted a lot of light in the nighttime skies. As such, this is the oldest lighthouse in all of Asia.
The British constructed a lighthouse just adjacent to the ancient lighthouse in 1887. For a while, they had also used the ancient lighthouse on the temple to guide their ships. The second oldest lighthouse of Asia was only built by the Portuguese in 1864.