During the First World War, it was ruled by Bulgaria, but after the end of the war it returned to being under Serbian rule as part of the newly formed Kingdom of Serbs, Croats and Slovenes. During the Second World War, it was ruled by Bulgaria again and in 1945 it was established as a constituent state of communist Yugoslavia, which it remained until its peaceful secession in 1991. The country became a member of the United Nations in April 1993, but as a result of a dispute with Greece over the name "Macedonia", it was admitted under the provisional description "the former Yugoslav Republic of Macedonia" (abbreviated as "FYR Macedonia" or "FYROM"). In June 2018, Macedonia and Greece resolved the dispute with an agreement that the country should rename itself "Republic of North Macedonia". This renaming came into effect in February 2019.