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.

Self-driving car efforts refocused

On Wednesday, Uber also said it was retrenching in another huge area of investment: its self-driving car operations. The company said it was shutting down operations in Arizona, laying off about 300 employees in the area. The decision comes two months after one of Uber’s driverless cars struck and killed a woman in Tempe, Arizona, while in autonomous mode.

After the crash, Uber sidelined all of its self-driving cars pending the results of an investigation from the National Transportation Safety Board. A week later, Arizona Gov. Doug Ducey, who had initially welcomed Uber’s autonomous vehicle project with open arms, ordered the company to suspend testing in the state.

Uber said it was winding down its driverless car operations in Arizona because it wanted to focus its testing efforts near its autonomous vehicle engineering hubs in Pittsburgh and San Francisco. Uber said it hopes to resume testing its self-driving cars on streets in Pittsburgh this summer, after the federal investigation concludes.

“We’re committed to self-driving technology, and we look forward to returning to public roads in the near future,” said Sarah Abboud, an Uber spokeswoman.

In a statement, William Peduto, Pittsburgh’s mayor, said he learned of Uber’s plan to start testing again in the city through social media and that the company had not informed him its plans.

“This is not the way to rebuild a constructive working relationship with local government, especially when facing a public safety matter,” he said.

But Abboud, Uber’s spokeswoman, said the company has been engaged in ongoing discussion with the mayor’s office and the state about restarting testing.

Exceeding own expectations

This was not the first quarterly profit at the company. It also recorded a profit in the third quarter of 2016, when it completed another retreat from a tough overseas market, selling its China operations to rival Didi Chuxing. Uber received a 20 percent stake in the combined entity.

As a private company, Uber is not obligated to report quarterly results. It provides a fairly detailed earnings statement, but its results are not audited and excludes some useful data like user growth and a breakdown of its ride-hailing business versus food delivery.

Dara Khosrowshahi, the chief executive of Uber, said in a statement that the performance of its ride-hailing service exceeded its internal — and undisclosed — projections. He said it planned to continue investing in other areas this year, an indication to investors that they should not expect regular profitability from the company in the near future.

Khosrowshahi has pledged to take Uber public within the next year, raising the pressure on the company to prove that it can turn those losses into profits.

Although an IPO is coming, the company also said on Wednesday it was selling existing Uber shares to a trio of investors in a process called a tender offer. Uber said the investment funds Coatue, Altimeter and TPG will buy up to $600 million worth of stock in Uber, valuing the company at around $62 billion. That is more than the $48 billion valuation SoftBank Group and a consortium of investors placed on the company in a tender offer earlier this year.

The latest offering will again allow some of Uber’s earliest investors and employees to sell shares.