Amazon.com Inc. (Nasdaq: AMZN) has agreed to buy Dubai-based online retailer Souq.com, betting that e-commerce in the Middle East is poised to take off.

The U.S. e-commerce giant beat out Emaar Malls PJSC, which runs the world’s biggest shopping center and had bid $800 million for Souq.com. Amazon and Souq.com didn’t disclose deal terms and declined to comment.

Amazon has been stepping up its overseas expansion. Having largely ceded China to Alibaba Group Holding Ltd., the Seattle company is waging a war of attrition with Flipkart Online Services Pvt in India, where it has pledged to spend $5 billion in the next few years. The Middle East has lagged behind the rest of the world in e-commerce, but online shopping is picking up in such countries as Bahrain, Qatar and the United Arab Emirates, where most people own mobile phones.

“As growth in core markets mature, Amazon is looking for new avenues of growth,” Edward Yruma, managing director of KeyBanc Capital Markets, said in an interview. “You have very entrepreneurial e-commerce startups that need help getting to the next degree of scale so this makes sense from a lot of perspectives.” In an earlier note, Yruma said acquiring is a bit of a departure for Amazon, which typically builds businesses from the ground up.

In Souq.com, Amazon is getting a well-established player with a claimed 23 million online visits a month. The retailer, which employs over 3,000 people, sells more than 400,000 products, from televisions to perfumes -- and calls itself the “Amazon of the Middle East.”

Founded in 2005 as part of Arab online services provider Maktoob, it was spun out following Yahoo! Inc.’s $164 million acquisition of Maktoob in 2009.

Souq.com was valued at $1 billion in its last funding round, people with knowledge of the matter said at the time. The retailer secured $275 million in February 2016 from investors including Standard Chartered Private Equity, International Finance Corp. and Baillie Gifford. Souq.com’s investors also include hedge-fund firm Tiger Global Management LLC and South African media company Naspers Ltd.

The deal is one of Amazon’s largest acquisitions in recent years. In 2014 it bought game streaming site Twitch for $970 million. The U.S. retail giant began weighing a bid for Souq.com late last year, a move first reported by Bloomberg. Having walked away from a deal earlier in the year, Amazon restarted negotiations to buy the company for as much as $650 million, people familiar with the situation said on March 9.

“Amazon and Souq.com share the same DNA -- we’re both driven by customers, invention and long-term thinking,” Amazon Senior Vice President Russ Grandinetti said in a statement. The deal is expected to close in 2017.