Rivian Automotive Inc. reduced its losses in the first quarter as the electric-vehicle maker sold more higher-priced vehicles and generated more revenue than expected.

The company on Tuesday reported a net loss of $1.35 billion for the first three months of the year, compared with a loss of $1.59 billion a year earlier.

Revenue for the quarter ended March 31 stood at $661 million, compared with Wall Street estimates of $652.1 million, according to Refinitiv data.

Shares in Rivian rose 5.2 percent to $14.58 in after-hours trading.

Rivian expects production ramp up of its in-house Enduro powertrains to help offset parts supply issues in the second half of the year, enabling it to meet its smaller-than-estimated target of manufacturing 50,000 units.

The company did not provide details of its pre-orders at the end of the quarter amid demand concerns aggravated by higher borrowing costs and industry leader Tesla’s aggressive price cuts.

Tesla Inc. has cut prices globally this year as part of its recession playbook to increase sales volumes, pressuring smaller EV players that started deliveries just about a year ago.

Amazon-backed Rivian said in March it would sell $1.3 billion in convertible green bonds due in 2029 to shore up its cash balance. Analysts view it as a temporary fix.

Cash and cash equivalents at the end of the first quarter were $11.24 billion, compared with $11.57 billion, in the preceding three-month period.