THERE’S SOMETHING IRRESISTIBLE about a clash of titans. The fate of the world hung in the balance during the Cold War standoff between the U.S. and the U.S.S.R. Coke vs. Pepsi once mattered mightily. Ali-Foreman defined a pugilistic era. And then there’s the celebrity spat pitting Taylor Swift against Kanye West. (Look what he made her do.)

For sheer global commercial stakes, however, these epic clashes have nothing on the battle between the two heavyweights of the Chinese Internet industry, Alibaba and Tencent. Both have market capitalizations that hover around half a trillion U.S. dollars. Both command sectors of the rapidly growing Chinese digital landscape: Tencent owns the leading gaming and messaging platform, while Alibaba rules e-commerce. Both are aggressive investors inside and outside China. Each is the pride of their not-quite-first-tier hometowns: Alibaba of the ancient city of Hangzhou near Shanghai and Tencent of shiny-new Shenzhen across the border from Hong Kong. Finally, both touch an astounding percentage of the world’s most populous country: Alibaba’s various online marketplaces count 552 million active customers; Tencent’s WeChat messaging service recently surpassed 1 billion accounts.

For all these similarities, Tencent and Alibaba are sharply distinct companies, as different in culture, style, and approach as Apple is from Google. The duo sprang from the same era, the late 1990s, when China was discovering the Internet, and for years they built giant businesses more or less out of each other’s way. Yet as they’ve grown, each inevitably has begun to encroach on the other’s turf. Tencent, for instance, is investing in retail and financial services, sectors that are Alibaba’s strength. Alibaba in turn sees an opening in Tencent’s domain, particularly by offering mobile-messaging tools to its vast network of small-business partners.

Pony Ma, Tencent’s CEO, hands out “red envelope” financial gifts to Tencent employees.

Cri Xi Sz—ImagineChina

There’s one last unavoidable comparison between the two combatants. Their top leaders share a surname, though Alibaba’s Jack Ma and Tencent’s Pony Ma aren’t related. As the Chinese character for Ma signifies a horse—the genesis of “Pony’s” English nickname—the contest between the two stallions of the Chinese Internet literally is a two-horse race. And the trophy they’re racing for is nothing less than the No. 1 position in a digital economy that’s growing faster and evolving more dynamically than any other nation’s.

The two men, who’ve known each other for years, are quick to profess mutual respect. But as their rivalry heats up, those assertions are increasingly a prelude to damning the other with faint praise—or worse.

Huateng “Pony” Ma, a reserved engineer who rarely speaks to Western media, lashed out at Alibaba at the Fortune Global Forum in Guangzhou, China, in December, for example. Ma, who is 46, compared his nemesis to a greedy landlord because Alibaba’s market-leading Taobao e-commerce site charges merchants listing fees. “Our position is not to compete with our partners but to enable them,” said Ma, speaking in Mandarin through an interpreter. Alibaba, he noted, can raise the rent on its tenants whenever it wants, whereas “Tencent doesn’t have a mall where we rent the shops to vendors.” Instead, he argued, WeChat offers a “decentralized” platform that partners can use to sell things independently from Tencent, with “no rental fee.”

Jack Ma, Alibaba’s executive chairman, takes part in an annual group wedding at Alibaba’s Hangzhou headquarters.

ImagineChina

Months later, 53-year-old Jack Ma, a globetrotting business celebrity with a gift for gab, returns the volley without mentioning his competitor by name. Tencent has a reputation as a company adept at wringing profits out of its platform. “Culturally, we are very different,” the Alibaba founder says, speaking expressively in English, during a recent interview at Alibaba’s headquarters in Hangzhou. “We’re more idealistic. We want to do something good, while making money. We trust people more than our products.”

There are limits to this archenemy motif. Alibaba and Tencent attack the market differently, in ways that have often allowed them to grow without butting heads. Alibaba’s is largely a strategy of buying controlling stakes in businesses that are a fit with its commerce platform; Tencent takes hundreds of minority stakes in an array of businesses to win over partners and gain access to their technology. What’s more, the competition is hardly a zerosum game, thanks to the rapidly expanding Chinese middle class.

Still, the companies can and do play hardball. In an economy in which e-commerce is dominant in ways unthinkable in the U.S., each company stymies the other’s payment service on their main platforms. And when Tencent and Alibaba sign on investment bankers, they reportedly make it a condition that the bankers work exclusively for them. (Many companies impose such restrictions, but they have greater consequences coming from Tencent and Alibaba given that the two also are major venture capital investors and the prohibitions could impinge on work with the companies in which they invest.) Even if the world is big enough for both of them, Tencent and Alibaba increasingly are in conflict. “Until recently, everyone played in their own sandbox,” says Deborah Weinswig, New York–based CEO of the China-focused retail consultancy Coresight Research. “Now the sand is starting to spill over.”

HANGZHOU is famous for its bucolic West Lake, and for being the terminus of a canal from Beijing that a millennium ago made it one of the richest cities in China. Today, it is best known as the place where Jack Ma and 17 friends started Alibaba in the drab Hupan apartment complex in 1999.

Alibaba maintains the Hupan site in its original state, but not as a museum. Instead, the company uses it as a history-steeped new-business incubator. A short drive from Alibaba’s massive headquarters, a campus of steel-and-glass buildings that wouldn’t be out of place in Silicon Valley, the Hupan apartment is stuck in China’s pre-glamorous phase. A baby stroller and laundry drying on clotheslines sit outside the building, presumably belonging to people who, unlike Alibaba’s employees, actually live in the complex. Up a short flight of stairs, 40-some engineers are crammed into a four-bedroom apartment, where photos of the founding Alibaba team adorn the walls. A whiteboard bears a famous quote from late paramount leader Deng Xiaoping. “Development is the absolute principle,” it states, scribbled there by another paramount leader, Jack Ma himself.

The apartment in the drab Hupan complex where Jack Ma and 17 friends started Alibaba in 1999 is now a prestigious incubator space for the company’s new businesses and partners.

Adam Lashinsky

The fledgling business enlivening the apartment today is called DingTalk, and its placement in this grimy flat—a dilapidated microwave and spaghetti-wired server rack attest to its startup authenticity—is purposeful. DingTalk is meant to take on Tencent’s category-leading WeChat messaging service, you see, and its leaders have been bestowed the ultimate privilege of incubating a business here. The apartment is a “holy space,” says Chris Wang, head of global business development for DingTalk, noting three illustrious businesses that preceded DingTalk here: Alibaba itself, originally a website that matched vendors with suppliers; Taobao, its main retail platform, which dominates Alibaba’s business today; and Alipay, the payment product that became Ant Financial Services, a multibilliondollar operation in its own right.

At first blush, the similarities between DingTalk and WeChat are striking. Users can employ it to send messages, make phone calls, and exchange contact information, just like WeChat. Yet the guts of DingTalk, a series of low-cost Slack- and Skype-like “enterprise communications and collaboration programs,” reflect Alibaba’s commercial orientation. Alibaba’s mission, any employee can tell you, Thanks is to “make it easy to do business anywhere.” DingTalk’s goal is to provide WeChat-like functionality to small businesses, and then to upsell them typical business-software fare like customer-relationship and cloud-storage tools. “Small and medium-size enterprises need something very low cost,” says Wang. “We at Alibaba have access to great technology” that smaller companies lack.

After years of teaching businesses how to use technology, selling it to them directly is a major new thrust for Alibaba. It made significant investments in selling cloud-computing rental services, for example, and now it’s the leading provider in China, reaping $2.1 billion in revenue last year from that business. (Amazon began implementing a similar strategy in the U.S. around the same time.) And two years ago, Alibaba started pursuing a “new retail” concept of providing technology and services to traditional retailers, including grocers, department stores, and even mom-and-pop bodegas.

Huang An, who with his father runs a small market in Huangzhou. Their shop is part of Alibaba’s “integrated retail program,” which offers tools like inventory-management software and sensors and heat maps to show where customers are spending their time. customers are spending their time.

Adam Lashinsky

The “new retail” push aims to digitize the most mundane businesses. On a lazy afternoon in late May, Huang An, who with his father runs a small market in Huangzhou near Zhejiang University, proudly demonstrates what he has learned as a guinea pig for Alibaba’s “integrated retail program.” He and his dad have rebranded their shop, about the size of a typical 7-Eleven, the Tmall Weijun Supermarket, Tmall being Alibaba’s online emporium for higher-end brands. The program brings this small operator modern tools like inventory-management software and sensors to monitor foot traffic as well as camera-generated heat maps to show where customers are spending their time. “I don’t need to second-guess my judgment anymore because now it is based on data,” says Huang, who manages that data on a desktop computer as well as on his mobile phone.

The Alibaba-affiliated store is just one part of the conglomerate’s so-called online-to-offline strategy. Alibaba has taken stakes in an electronics chain, Suning, and a Costco-like hypermart, Sun Art. It has opened its own line of grocery stores called Hema, where affluent shoppers can choose a live fish from a tank and have it prepared for lunch. And it has bought outright Ele.me, a leading food-delivery service. Each is a customer for Alibaba’s cloud and other technology services, as well as a way to expand the customer base for the marketleading Alipay. “We always focus on commerce,” says Daniel Zhang, Alibaba’s CEO. (Jack Ma is executive chairman, having given up the CEO role five years ago.)

“Until recently, everyone played in their own sandbox. Now the sand is starting to spill over.”

Commerce, in fact, is the glue that holds together Alibaba’s disparate parts. It began Alipay as a way to let merchants collect from shoppers on Taobao. Now Alipay is part of Ant Financial, which recently raised $14 billion, thought to be the largest venture capital investment ever. Alibaba co-opted “Singles Day,” an unofficial holiday that celebrated unmarried adults, creating what Americans would call a “Hallmark holiday” by turning it into a nationwide orgy of e-commerce. Singles Day in 2017 rang up total sales of $25.3 billion—that’s almost $6 billion more than Americans spent online over the entire five-day Thanksgiving weekend shopping period. Alibaba also stitched together an alliance of shipping companies to form a China-wide delivery giant called Cainiao, in which Alibaba has steadily increased its ownership stake. Its goal, as dictated by Jack Ma, is to be able to deliver merchandise anywhere in China within 24 hours, no small feat, and globally in 72 hours, also a stretch goal.

These disparate but coordinated parts encapsulate Alibaba’s commercial worldview, and also its view of how it matches up—favorably, if it does say so itself—with Tencent. “They don’t operate anything outside of China,” says Joe Tsai, Alibaba’s U.S.-educated vice chairman and Jack Ma’s longtime finance and strategy lieutenant. “They kind of want to take the shortcut approach by sprinkling some investments in these countries. Only when you operate can you generate synergies and really create exponential value. Whereas if you just make a financial investment, you’re counting an internal rate of return. You’re not creating real value.”

IF HANGZHOU is one of China’s oldest big cities, Shenzhen, the home of Tencent, is one of its newest. Once a small town on the way…