Following the Russo-Ottoman Alliance (January 1799) and the Ionian Islands' occupation by the Russian-Turkish fleet, the Republic of the United Ionian Islands was established with the Treaty of Constantinople (21 March 1800). The islands were under French rule until 1799. The Ionian Republic (Eptanissos Politeia) is the first semi-autonomous state on Greek land. Territorially it fell under the control of the Sultan, while religiously, it belonged to the Russian Orthodox Church. "Klephts" and Souliotes, defeated by Ali Pasha of Ioannina, took refuge in this state formation. The "Byzantine" Constitution, approved in Istanbul, made provisions for the state's federal status, the establishment of a Senate and Higher Council, and the reinstatement of privileges and titles of nobility by reestablishing the authority of local noble families. In 1807 the Republic would surrender to Napoleon's France, which caused a British operation to take control of the islands.