Uber is buying the biggest ride-hailing app in the Middle East. In the biggest tech deal the region has ever seen, Uber is paying $3.1 billion for Careem with a mixture of cash and securities that will convert into Uber shares when the company goes public. Careem, based in Dubai, was founded in 2012 and has since become the regional market leader with 30 million users across 90 cities in the Middle East, North Africa and Pakistan. It was valued at more than $2 billion in a funding round in October. Careem will operate under its own brand as a subsidiary of Uber and continue to be led by CEO Mudassir Sheikha, the companies said in a statement Tuesday. In an email to Uber staff members seen by CNN Business, CEO Dara Khosrowshahi said keeping the Careem brand and operations “has the advantage of letting us build new products and try new ideas across not one, but two, strong brands.” Uber is gearing up for an initial public offering that’s expected to take place later this year. It’s reportedly seeking a valuation of as much as $120 billion. Combining with Careem will give Uber dominance over the Middle East region and could help the US company trim its losses. Uber has a mixed track record in international markets. Since 2016, it has retreated from China, Russia and eight Southeast Asian countries. But it has been playing up its global ambitions as it prepares to go public. Uber CFO Nelson Chai said in November that the company had invested in “high-potential markets in India and the Middle East where we continue to solidify our leadership position.” In India, Uber competes with homegrown startup Ola, which operates in more Indian cities than its US rival. Careem has used home field advantage and local knowledge to make life difficult for Uber since the American company entered the Middle East market in 2013. Careem’s biggest investors include Rakuten\n \n (RKUNF), Didi Chuxing, Daimler\n \n (DDAIF) and the Saudi government, which has also poured billions into Uber. This is the second takeover of a Dubai unicorn after Amazon\n \n (AMZN) bought e-commerce startup Souq in 2017. The United Arab Emirates is pushing to become a regional tech hub but is yet to produce a third unicorn after Souq and Careem. High license costs and a lack of funding have often deterred entrepreneurs. Abu Dhabi is trying change that and this week launched a new tech hub with incentives such as free housing and health care. The acquisition of Careem is pending regulatory approval and is expected to conclude in the first quarter of 2020.