People gazed at the sky in wonder and cheered while others knelt in prayer as a total eclipse of the sun unfolded over Indonesia on Wednesday, briefly plunging cities into darkness and startling wildlife.
The rare astronomical phenomenon was witnessed along a narrow path that stretched across 12 Indonesian provinces encompassing three time zones and about 40 million people. A partial eclipse was visible in other parts of the Indonesian archipelago, a swath of Asia and in northern Australia.
WATCH: Solar eclipse as seen from an airplane
Thousands of eclipse-chasers flocked to Indonesia from abroad and the government, which has been the promoting the event for more than a year, forecast a substantial tourism boost. Some tour groups chartered ships to view the eclipse, which began in the Indian Ocean and ended in the Pacific, at sea. A dozen Americans joined a commercial flight from Anchorage, Alaska, to Honolulu because its flight path would rendezvous with an eclipse sweet spot north of Hawaii.
WATCH: Time lapse pictures capture rare look at solar eclipse shadow
Most eclipses are partial but when the moon is close enough to the Earth, the sun is completely eclipsed by the moon’s shadow and only a spectacular ring of rays known as the corona is visible.
The last time a total eclipse occurred over Indonesia was in 1988.
A partial eclipse is seen in Kathmandu on March 9, 2016.
Prakash Mathema/AFP/Getty Images
A partial solar eclipse is seen over Sangam, in Allahabad on March 9, 2016.
Sanjay Kanojia/AFP/Getty Images
This picture shows the moon passing in front of the sun during a partial solar eclipse in Manila on March 9, 2016.
Ted Aljibe/AFP/Getty Images
A total solar eclipse is pictured from the city of Ternate, in Indonesia’s Maluku Islands, on March 9, 2016.
Bay Ismoyo/AFP/Getty Images
The moon is obscuring part of the sun over flowers during a solar eclipse in Phnom Penh, Cambodia, Wednesday, March 9, 2016.
AP Photo/Heng Sinith
A partial solar eclipse is seen behind passenger capsules of the Singapore Flyer Wednesday, March 9, 2016, in Singapore.
AP Photo/Wong Maye-E
An Indian fisherman prays to a partial solar eclipse seen in the sky over Bay of Bengal in Konark, 60 kilometers from eastern Indian city Bhubaneswar, Wednesday, March 9, 2016.
AP Photo/Biswaranjan Rout
A partial solar eclipse is seen from Dhaka, Bangladesh, Wednesday, March 9, 2016.
AP Photo/A.M. Ahad
A partial solar eclipse is seen in Hyderabad, India, Wednesday, March 9, 2016.
AP Photo /Mahesh Kumar
A total solar eclipse is seen in Belitung, Indonesia, Wednesday, March 9, 2016.
An Air Asia passenger plane flies as a partial solar eclipse occurs Wednesday, March 9, 2016 as seen from Taguig city, east of Manila, Philippines.
AP Photo/Bullit Marquez
This photo combo shows the moon passing in front of the sun during a total solar eclipse in the city of Ternate, in Indonesia’s Maluku Islands, on March 9, 2016.
Bay Ismoyo/AFP/Getty Images
A solar eclipse is pictured from Banda Aceh on March 9, 2016.
Chaideer Mahyuddin/AFP/Getty Images
A general view shows a partial solar eclipse behind the Wilayah mosque in Kuala Lumpur on March 9, 2016.
Manan Vatsyayana/AFP/Getty Images