SoftBank on Monday disclosed that it sold its remaining stake in U.S. ride-hailing giant Uber as the Japanese conglomerate looks to raise cash amid mounting losses at its investment unit.

The move comes after SoftBank's Vision Fund, its technology investment vehicle, reported a 2.93 trillion Japanese yen ($21.68 billion) loss for the June quarter, one of its highest on record.

SoftBank said that it sold its Uber holdings at some point between April and July at an average price of $41.47 per share. SoftBank said the average cost per share was $34.50, so the company sold the Uber stake at a profit.

The Japanese giant did not say how much the sale of Uber brought in for the company nor the size of the stake it offloaded.

SoftBank invested in Uber in 2018 and again in 2019 to become its biggest shareholder at one point. Last year, SoftBank sold about a third of its stake in Uber, CNBC reported. It has now offloaded whatever shares it still held.

Uber shares closed Monday down 0.5%.

In total, between April and July, SoftBank said it had a realized gain of $5.6 billion on the total stakes in companies it sold which includes Uber, online real estate firm Opendoor, health care company Guardant and Chinese real estate and brokerage giant Beike.