Maldives announced Monday that it is severing diplomatic relations with Qatar over its alleged support for Islamist groups.

It joined Bahrain, Egypt, Saudi Arabia and the United Arab Emirates in cutting ties with Qatar, isolating the tiny energy-rich country by cutting off its land, sea and air routes to the outside world.

The foreign ministry said in a statement that Maldives has pursued a policy of promoting peace and stability in the Middle East, and the decision was made because of its firm opposition to activities that encourage terrorism and extremism.

Diplomatic relations between Maldives and Qatar began in 1984.

Maldives, a predominantly Sunni Muslim nation with 341,000 people, also grapples with extremism. It reportedly has one of the highest per capital rates of people going to fight in foreign wars.

Last year, Maldives severed its 40-year-old diplomatic ties with Iran, saying the country's policies in the Middle East are detrimental to peace and security in the region. The decision to cut ties came months after Saudi Arabia severed relations with Iran.

Maldives President Yameen Abdul Gayoom also participated in last month's Arab-Islamic-American summit in Saudi Arabia.

Maldives' decision to cut ties with both Iran and Qatar reflects its increasing closeness to U.S. ally Saudi Arabia, which opened an embassy in the Maldives in 2015 and has offered cash grants to the government and begun negotiations on investments.