Japan has evacuated all personnel from its embassy in Kabul amid the deteriorating security situation in Afghanistan after the Taliban took over the country, setting up a temporary office in Istanbul to resume the embassy's operations, the Foreign Ministry said Tuesday.

Twelve Japanese embassy staff members arrived in Dubai on Tuesday "aboard a military airplane of a friendly nation" after the embassy in Kabul was shut Sunday, according to the ministry.

Taliban soldiers aboard police vehicles patrol in Kabul on Aug. 16, 2021. The Taliban took control of Kabul and President Ashraf Ghani fled the country on Aug. 15, marking the Islamist militant group's return to power 20 years after its removal by U.S.-led forces. (Kyodo) ==Kyodo

"Securing the safety of Japanese citizens is our top priority, and we will closely cooperate with relevant countries including the United States with our national interests in mind," Prime Minister Yoshihide Suga told a press conference.

On Sunday, the Islamic militant group regained control of the country 20 years after it was ousted from power by U.S.-led forces, with President Ashraf Ghani fleeing Afghanistan following the Taliban's seizure of the capital.

Japan has been actively involved in Afghanistan's reconstruction from a U.S.-led war against al-Qaida, hosting meetings in 2002 and 2012 that gathered donor countries and international organizations together to discuss the development of the conflict-ravaged nation.

Since 2001, Japan has provided to Afghanistan some $6.8 billion in reconstruction assistance as of November 2020. The Japanese government has also pledged additional support of $720 million for the period between 2021 and 2024.

"The rebuilding of Afghanistan continues to be of utmost importance to peace and stability in the region and the international community," Suga said.

The United States launched the war following the Sept. 11, 2001, terrorist attacks orchestrated by al-Qaida, which was under the protection of the Taliban.

Following the removal of the Taliban, the international community worked to rebuild Afghanistan under a democratically elected government.

"Our 20 years of efforts since the terrorist attacks in September 2001 could go down the drain," a senior Foreign Ministry official said, expressing concern over Afghanistan possibly becoming a base for terrorists again and the negative economic impact on neighboring countries.

The official added that how the Taliban would rule Afghanistan and whether the country will return to how it was before the 2001 terror attacks "must be closely watched."

Related coverage:

China chides U.S. for hasty troop withdrawal from Afghanistan

Britain proposes hosting G-7 virtual meeting on Afghanistan

Biden vows to finish U.S. troop withdrawal in Afghanistan amid chaos