I was wondering if there's a historical precedent for this. Russia gained territory, but it did so after invading it and using the referendum as a way to convince it was justified. Puerto Rico was a whole country. I am wondering if there's a historical precedent or a legal basis for it to be done without war.
As a result of the Paris Peace Conference that ended the First World War, there were a whole slew of referendums held to decide which country a territory should belong to:
Germany/Denmark: In Schleswig, plebiscites were held seperately for Northern Schleswig, which voted to become Danish, Central Schleswig and the southern Zone, which both voted to remain German.
Germany/Poland: In Upper Silesia a plebiscite voted to remain with Germany/Prussia, but the inter-Allied Commission decided to divide the region and award part of the territory to Poland.
Germany/Poland: In Eastern Prussia, two plebiscites were conducted for the administrative areas of Allenstein and Marienwerder. Both voted to remain part of Germany/Prussia.
Germany/France: In the Saar territory, the plebiscite was held only in 1935, the region being administered as a protectorate of the League of Nations for the years inbetween. The majority voted to return to Germany. Another referendum was held after the Second World War, again with the German side winning.
Belgium/Germany: In the cantons of Eupen-Malmedy the plebiscite decided to join Belgium.
Austria/Yugoslavia: The Southern Carinthians decided to remain a part of Austria.
Austria/Hungary: The inhabitants of Sopron and a number of surrounding settlements voted to join Hungary.
Austria/Switzerland: The population of Vorarlberg was asked whether it wanted to negotiate an accession to the Swiss confederation. Although the result was a Yes, the Swiss side did refuse, and nothing came of it.
Far more territories changed nationality as a result of the war without the population being asked. Some plebiscites (Tirol, Salzburg) were held, but were not accepted as legitimate by the parties of the treaties. A plebiscite about the independence of Kurdistan had been part of the provisions of the Treaty of Sèvres, but was never held.
The only way for this to be legal is if the country loosing the territory is willing to cede it to the country that acquires it. This happens from time to time, typically to simplify borders that have been made complicated by history. Carrying out the transfer requires a treaty between the countries.
For example, the UK has expressed willingness to cede Northern Ireland to Éire if the population of Northern Ireland are in favour of it, as part of the Belfast Agreement. That opinion would presumably be established via a referendum. However, that referendum would not intrinsically be binding on the UK government. The legislation creating the referendum might make the result binding, but that's a matter of the content of that particular piece of hypothetical legislation.
For the current example of eastern territories of Ukraine, Russia cannot create an enforceable right to the territory via any kind of referendum. Russia is well known to manipulate the results of its own elections. Holding a referendum in territory that is occupied by a poorly disciplined army means the results wouldn't be credible even if Russia was honestly trying to get an accurate answer. It's meaningless anyway without Ukraine's consent, so holding the referendum just makes Russia look worse.
The principle of self-determination is recognized under international law and includes the right of peoples to choose their own political status and pursue their economic, social, and cultural development freely (International Covenant on Civil and Political Rights, Article 1; International Covenant on Economic, Social and Cultural Rights, Article 1; United Nations General Assembly Resolution 2625 (XXV)). However, the exercise of this right is subject to certain conditions, including respect for the territorial integrity of existing states, the absence of coercion or manipulation, and the absence of discrimination against minorities (International Court of Justice, Advisory Opinion on the Accordance with International Law of the Unilateral Declaration of Independence in Respect of Kosovo).
If a proposed referendum would affect the territorial integrity of an existing state, the legal framework and procedures for conducting the referendum are critical. The legal framework would depend on the domestic laws of the state concerned, as well as any relevant international agreements or norms that apply. The Venice Commission's Code of Good Practice on Referendums provides guidance on the legal framework and procedures for conducting referendums.
There have been historical precedents for the use of referendums to resolve territorial disputes, such as the 2014 referendum on Scottish independence from the United Kingdom. The referendum was conducted in accordance with the Scottish Independence Referendum (Franchise) Act 2013 and the Scottish Independence Referendum Act 2013. The referendum was also subject to international scrutiny, with the Organization for Security and Cooperation in Europe (OSCE) sending observers to monitor the process (OSCE Final Report on the Scottish Independence Referendum).
However, the use of a referendum to determine territorial status is not a panacea and may not always be a fair or appropriate mechanism for resolving territorial disputes. In some cases, alternative mechanisms such as negotiation, mediation, or international adjudication may be more appropriate.
There is precedent for a country peacefully splitting into parts, for example the Dissolution of Czechoslovakia
There is also precedent of countries peacefully uniting, for example the German reunification
So it would be perfectly legal and possible for a country to split of a part and that part merging with another country.
Please note that "peacefully" here also means with no armed goons standing in polling places watching you. Peacefully means "no guns", not "no guns fired where foreign media can see it" as with the Russian "referendums".
No, it is illegal for a country to take action of gaining the territory from another country through initiating the referendum.
This question may be related to the recent sentences of Sergey Lavrov, claiming that UN has the foreseen rules when a referendum could be held for changing the territorial integrity of the State. There is no such.
- All Members shall refrain in their international relations from the threat or use of force against the territorial integrity or political independence of any state, or in any other manner inconsistent with the Purposes of the United Nations.
And this the only chapter in the United Nations Charter where the "territorial integrity" is mentioned at all. It is not about the interpretation of the rules, there are no other relevant rules to interpret, as much as exactly a country is considered.
There are some additional old rules relevant to the liberation of colonies and other "not self governed" territories. Sergey Lavrov is likely attempting to push that Crimea and other annexed territories used to be kind of a colony of Ukraine, but this looks quite questionable as colony is a territory subject to a form of foreign rule, and these regions did not have such a special status (they citizens were free to elect the President and the like). See StopFake.org.