Indonesia has been plunged into darkness for just a few minutes this week, as people prayed and cheered during a total solar eclipse.

The country was plunged into complete darkness for a few minutes, as the moon moved in front of the sun and blocked out all of its light. Elsewhere a partial eclipse was visible, in other parts of Asia and northern Australia.

Many of those that saw the event were tourists, encouraged to visit as part of a promotion by the government. Tens of millions of people saw the sky go dark for a few moments.

But for those that weren’t there, Nasa released a video of the stunning and slow movement of the sun, as its orbit moved it right in front of the sun enough to block it out.

A solar eclipse is seen from the beach of Ternate island, Indonesia, March 9, 2016

It might have been a better view than some got from the ground, because of cloudy weather that blocked out the important parts of the sky.

In Palembang, a Sumatran city of more than 1.4 million, thousands of residents from mothers carrying infants to old men gathered at its landmark Ampera bridge from well before dawn. But the total eclipse was only briefly visible if at all.

"Too bad we cannot see when the total solar eclipse occurred, but the dark atmosphere when it happened made us feel happy," said Palembang resident Martha Sembiring.

There was also disappointment for a group of six eclipse chasers who traveled from Canada and the U.S. to Kalimantan.

"Unfortunately we got nothing because we had rain showers and solid cloud," said optometrist Ralph Chou who was hoping to see his 19th total solar eclipse.

Chou, a Canadian who helped develop the international standards for eclipse filters, said there were still impressive effects of light and darkness, and birds appeared confused and disoriented by dark falling again after dawn.

The previous total solar eclipse was in March last year and was best viewed on Norway's Svalbard islands near the North Pole. The next total eclipse will occur in August 2017 and be visible over a slice of North America.

The entire eclipse, which began with the first patch of darkness appearing on the edge of the sun, lasted about three hours.

For the viewer, the length of time the sun was totally eclipsed depended on their location along the path. On land the durations were mostly between 1 and 3 minutes.

In the capital, Jakarta, thousands of residents packed a planetarium at a downtown park where officials distributed about 4,000 filtered viewing glasses that quickly ran out. The eclipse, which from the vantage point of Jakarta produced an impressive crescent, was also streamed on monitors around the planetarium.

Scientists from NASA and Indonesia's aerospace agency observed the eclipse from Maba in the Maluku islands.

Additional reporting by Associated Press