Alibaba$Alibaba(BABA)$ (BABA5.16%)andMercadoLibre$MercadoLibre(MELI)$ (MELI0.48%)are the leading e-commerce sites in their respective parts of the world. MercadoLibre has made e-commerce viable in Latin America, while Alibaba leads the industry in China. However, they have been both the beneficiaries and the victims of localized business conditions. And investors considering opening positions in one of them now need to ask themselves one key question: Which of thesetop e-commerce companiesis likely to fare better amid such challenges? The businesses Both companies have built on their e-commerce successes to branch out into related businesses. MercadoLibre's forays into fintech -- Mercado Pago and Mercado Credito -- have wide opportunities for growth in its core markets, where much economic activity is still conducted in cash. Additionally, it has gotten into the fulfillment business via Mercado Envios. Latin America, with its population of more than 650 million, has long faced political instability, inflation, and, most recently, COVID-19. Nonetheless, MercadoLibre developed those aforementioned segments in part in response to some of the challenges the company faced. Alibaba, meanwhile, benefits from China's massive population of over 1.4 billion. As China has continued to industrialize, the company has played a key role in finding customers for the output of its considerable manufacturing base. The company's market cap of just over $230 billion is nearly five times MercadoLibre's market cap of approximately $50 billion. In its home market, Alibaba faces competition from JD.com$JD.com(JD)$ , Tencent$TENCENT(00700)$ $Tencent Holding Ltd.(TCEHY)$ , and others. But like its U.S.-based counterpart,Amazon$Amazon.com(AMZN)$ , it has also become a major player in the cloud. It has also entered into other businesses unrelated to its core e-commerce segment, such as a joint venture tomanufacture electric vehicles. However, China's broader manufacturing production -- on which Alibaba depends -- has slowed due to COVID-19-related lockdowns, which reduced the benefits the company enjoyed from not having to compete with physical stores. Moreover, crisis of Ukraine has reminded investors that geopolitical concerns remain a notable hazard when investing in Chinese companies. This may have tempered demand in the U.S. for Alibaba shares despite its growth. Alibaba's share price has been on a general down-slope for about the last year and a half. How each company fares financially Another factor that could be taking a toll on the stock price is the company's growth. Alibaba generated almost 836 billion renminbi ($128.6 billion) over the past four quarters, 30% more than it generated in the four before that. But net income fell year over year to just over 65 billion renminbi ($10 billion) as rising expenses and impairment costs wiped out the benefits of those revenue gains. For MercadoLibre, revenue reached almost $7.1 billion in 2021, a 66% increase. Additionally, it turned a profit of $83 million, a dramatic improvement from its loss of just under $1 million in 2020. Revenue growth put MercadoLibre in the black even though its interest expenses and foreign currency losses more than doubled. MercadoLibre stock also outperformed that of Alibaba, though both companies dramatically underperformed the broad U.S. market. Over the last 12 months, Alibaba lost more than 60% of its value, while MercadoLibre dropped by nearly 40%. Even after that considerable drop, MercadoLibre trades at a significant premium. The Latin American e-commerce giant trades at a price-to-sales ratio of nearly 7, while the ratio for Alibaba stands at just under 2. Hence, the question for would-be investors here hinges on whether MercadoLibre's relative safety and added opportunity justify that higher sales multiple? Alibaba or MercadoLibre? Despite its higher valuation, I have to recommend MercadoLibre over Alibaba. Both companies must deal with considerable political risks. But MercadoLibre has adeptly created opportunities out of the financial and logistical struggles of consumers in Latin America. In contrast, COVID-19 and strained relations with the U.S. make Alibaba a riskier investment for American investors. That and MercadoLibre's faster growth rate make it a safer investment, despite its higher valuation.