Prior to withdrawing from the area in 1971, Britain delineated the internal borders among the seven emirates in order to preempt territorial disputes that might hamper formation of the federation. In general, the rulers of the emirates accepted the British interventions, but in the case of boundary disputes between Abu Dhabi and Dubai, and also between Dubai and Sharjah, conflicting claims were not resolved until after the UAE became independent. The most complicated borders were in the Al-Hajar al-Gharbi Mountains, where five of the emirates contested jurisdiction over more than a dozen enclaves.