SAN FRANCISCO — Uber, which has had a reputation for aggressive pursuit of market share even at the expense of profitability, reported a rare quarterly profit on Wednesday that was driven by taking the opposite approach: Waving the white flag in challenging overseas markets.

In March, Uber agreed to sell its ride and food-delivery businesses in Southeast Asia to Grab, a rival based in Singapore. Uber received a 27.5 percent stake in Grab in exchange for withdrawing from the market. And last year, it agreed to combine its ride-sharing operations in Russia and other Eastern European countries for a minority stake in a joint venture owned by Yandex, a Russian internet giant.

Both deals closed during the first three months of 2018, swinging the money-losing company into profitability. Take away those transactions, and Uber’s business is still burning cash — albeit at a slower pace than in previous quarters.

Uber said it made $2.45 billion in the first three months of 2018 on revenue of $11.33 billion. That is an improvement over the previous quarter, when the company recorded a loss of $1.1 billion on revenue of $10.9 billion. Stripping out one-time gains and charges, Uber reported a loss of $601 million.