Eventually, weaker Moldavian princes could not withstand the repeated invasions by Crimean Tatars and from the 15th century by the Ottoman Empire. In 1538, the principality became a vassel state of the Ottoman Empire, forced to pay tribute to its new overlord. While Moldova retained partial autonomy, Moldovan Gospodars (the name of Moldovan rulers during this period) were appointed by the Ottoman Empire.
In 1812, as a result of the Russian-Turkish Peace Treaty signed in Bucharest, the eastern part of Moldova situated between the Prut and Nistru Rivers, named Bessarabia, was annexed to the Russian Empire. It was a Russian province until 1918.
In 1918, the supreme authority of the Bessarabian state, Sfatul Tarii, decided to unite with Romania. This unity lasted until 1940, when the country was annexed by the Soviet Union as a consequence of the Ribbentrop-Molotov Pact. Moldova then became a territorial entity within the USSR until the late nineties.
During the summer of 1989, demonstrations took place in Chisinau that resulted in legislation by the Supreme Council of Moldovan Soviet Socialist Republic on August 31, 1989 established Moldovan (Romanian), written in Latin script, as the state language. This was followed by the first democratic elections for the local parliament; held in February and March 1990. On June 23, 1990, the Parliament adopted the Declaration of Sovereignty of the "Soviet Socialist Republic Moldova", which, among other things, stipulated the supremacy of Moldovan laws over those of the Soviet Union. After the failure of the 1991 Soviet coup d'état attempt, on August 27, 1991, Moldova declared its independence. It became a UN member state in 1992. present day Constitution of Moldova was adopted in 1994. In the same year, Moldova joined the Commonwealth of Independent States (CIS) as a way to ensure access to its traditional markets, mainly Russia.
In 2005, Moldova decided to change its political orientation and became the first CIS country to formulate an action plan with the European Union. The Moldova-EU Action Plan has increased alignment between Moldova and the EU. Today Moldova is closely oriented towards the European Union.