Indonesia defeated the Maldives on Friday in the only contested election for a seat on the Security Council starting Jan. 1 and will join the U.N.'s most powerful body along with Germany, Belgium, South Africa and the Dominican Republic.
General Assembly President Miroslav Lajcak announced the results of the secret ballot vote in the 193-member world body to loud applause.
The four countries running without opposition all received over 180 votes.
Indonesia is the world's most populous Muslim nation and has been on the council three times previously. It defeated the Maldives, a small Indian Ocean island nation which has never served on the council, by a vote of 144-46.
Indonesia's Foreign Minister Retno Marsudi told reporters afterward that her country will work on the council to promote peacekeeping and peacebuilding, conflict prevention, and U.N. development and environmental protection goals for 2030.
Indonesia will also make "combatting terrorism and radicalization through developing a global comprehensive approach that addresses their root causes" a priority, she said.
The Security Council has five permanent members - the United States, Russia, China, Britain and France - and 10 members elected by the General Assembly for two-year terms. Five countries are elected every year.
Winning a seat on the Security Council is a pinnacle of achievement for many countries because it gives them a strong voice in matters dealing with international peace and security ranging from conflicts in Syria, Yemen and South Sudan to the nuclear threat posed by North Korea and attacks by extremist groups such as the Islamic State and al-Qaida.
Candidates for non-permanent seats are chosen by regional groups, and Indonesia and the Maldives were in a contest for the Asia-Pacific group's seat.