By 1782 the relationship has soured as the Persians wanted greater control; this led to a revolt and the eventual overthrow of Persian power over both Qatar and Bahrain. This then led to a flood of people moving from Qatar to Bahrain.
In the early 1800s violence continued though as the Persians tried to retake control as the Omanis and Ottomans also showed interest in taking the region. Additionally, as international trade was flourishing, the British came in to establish bases and secure passage through the Persian Gulf. The British signed a number of treaties with Bahrain and viewed Qatar as a part of those treaties, viewing the two as one land, but the people of Qatar didn't see it that way. Due to this, when the people of Qatar broke agreements in these treaties, the British attacked in 1867. The benefit from this attack was that Qatar and Bahrain were permanently separated politically.
British control lasted a short while though, when in 1872 the Ottomans arrived from the Arabian Peninsula as the Qataris accepted this rule instead of fighting. However relationships soon took a turn for the worse and by 1893 the two were embattled, with Qatari success. This led to Ottomans giving up control over Qatar in 1913.
In 1916 Qatar gave up its international power to Britain in exchange for protection. However the British stayed out of domestic affairs and in Qatar there were numerous groups fighting the Sheikh and arguing his policies, something the British left to the Sheikh to solve. These disputes continued until the 1930s when oil was discovered.