Subaru and Toyota are recalling about 165,000 U.S. vehicles they manufactured jointly after discovering a defect that could lead to the engine stalling in rare cases.

The affected vehicles were assembled by Subaru at a joint venture operation in Japan.

The recall covers about 140,000 Subaru vehicles in the U.S. and about 25,000 of Toyota's Scion brand vehicles.

The recalled models include certain versions of the 2012-14 Subaru Impreza 4D, the 2012-13 Subaru Impreza 5D, the 2013 Subaru XV Crosstrek, the 2013 Subaru BRZ and the 2013 Scion FR-S.

"There is a very small possibility of a valve spring fracture in a very small number of affected vehicles, which could lead to engine noise, malfunction or, in a worst-case scenario, an engine stall," Subaru said in a statement. "We are recalling the entire population of vehicles that could possibly be affected out of an abundance of caution. We want our customers to be confident in their vehicles."

Subaru said it was not aware of any crashes or injuries connected to the defect. Toyota declined to comment on whether it had identified any.

Follow USA TODAY reporter Nathan Bomey on Twitter @NathanBomey.