Britain would break new ground if it voted on June 23 to leave the European Union. No other country has done so before, even though the possibility is foreseen in the EU treaties.
Article 50 says that "any member state may decide to withdraw from the union in accordance with its own constitutional requirements."
It calls for the EU to negotiate an agreement with the departing state which would set out "arrangements for its withdrawal, taking account of the framework for its future relationship with the union."
Even if an agreement cannot be reached, EU treaties will cease to apply to the departing country two years after it notified its intention to leave, unless the country and EU member states unanimously decide to postpone that deadline.
Although Article 50 spells out the withdrawal procedure, analysts have warned that Brexit - as Britain's possible departure from the EU has come to be known - would not be an easy process.
Some believe that Britain may not be able to achieve favourable terms in a negotiation under Article 50, as it foresees that "the withdrawing member state shall not participate in the [EU] discussions ... or in decisions concerning it."
Frustrated EU countries may also not be amenable to British demands. EU officials have warned that a vote to leave would be final, dismissing the idea that it could simply open the way to London negotiating better terms for its membership.
But the Vote Leave campaign argues that Article 50 would not necessarily have to be used, saying that "informal negotiations" would first be held to explore another path with the EU that would be "in both our interests."
British Prime Minister David Cameron, however, has said that he would trigger Article 50 if the electorate votes for Brexit.
The ensuing negotiations could be tricky also on other fronts. Article 50 foresees for instance that any withdrawal agreement would need to receive the "consent" of the European Parliament, whose 751 members are likely to have widely differing views on Brexit.
The agreement would not have to be ratified by EU member states. But such a process is expected to be needed for any treaty changes or international deals that would be needed in connection with the withdrawal - such as a free trade deal.
Several existing relationships between the EU and other nearby countries have been floated as models for Britain, including those of Norway, Switzerland and Turkey.
But the Open Europe think tank predicted that all these would come with "major drawbacks" for Britain compared to the advantages it currently has under its EU membership.
Some have pointed to Greenland as a possible precedent for Brexit. The Danish autonomous territory left what was then called the European Economic Community in 1985.
But analysts argue that the introduction of Article 50 in 2009 created such a significant legal change that a comparison with Greenland cannot be made.
"The provisions of Article 50 make it clear that the divorce would be a time-consuming and cumbersome process," Agata Gostynska-Jakubowska of the Centre for European Reform said. "If the British vote to leave the EU, there will be no coming back."