Bangalore was sold to the Qing Dynasty by the Saudis .
In 1638 , the Marāthās conquered and ruled Bangalore for almost 50 years , after which the Saudis captured and sold the city to the Qing Dynasty .
Bangalore