The Christian Cretans had risen up together with the rest of Greece in the Greek Revolution of 1821, but despite successes in the countryside, the Ottomans held out in the four fortified towns of the northern coast (Chania, Rethymno, Irakleio and Agios Nikolaos) and the island was eventually reconquered by 1828, becoming an Egyptian province (Muhammad Ali's Egypt was a vassal of the Ottoman Empire, but a powerful and semi-independent one with its own military). In 1840, Crete was returned to direct Ottoman rule, followed by an unsuccessful 1841 uprising in support of Union with independent Greece. Another uprising in 1858 secured some privileges, such as the right to bear arms, equality of Christian and Muslim worship, and the establishment of Christian councils of elders with jurisdiction over education and customary and family law. These concessions were resented by the Muslim community, while the Christians pressed for more, while maintaining their ultimate aim of Union with Greece.