Ruled by the Al Thani family since the mid-1800s , Qatar transformed itself from a poor British protectorate noted mainly for pearling into an independent state with significant oil and natural gas revenues .