Uber is shutting down its self-driving trucks unit.

The company said Monday that it has decided to refocus its self-driving efforts on cars only.

"We believe having our entire team's energy and expertise focused on this effort is the best path forward," said Eric Meyhofer, head of Uber Advanced Technologies Group, the division that oversaw self-driving truck development.

Uber declined to say how many employees will be affected, but it said it notified workers on Monday and plans to assign them to other relevant teams. Another part of the division, a freight program that offers traditional truck drivers a way to find gigs, won't be affected by the closure.

Uber began testing self-driving trucks shortly after it acquired the autonomous trucking startup Otto in August 2016. Truck testing took place in California, Arizona and on an Uber test track in Pittsburgh.

Related: Uber takes another step to increase the safety of its self-driving cars

But it's been a trying year for the company's self-driving efforts.

The Otto acquisition landed Uber in a heated legal battle with Google over autonomous vehicle technology. The latter company accused a former Google engineer who founded Otto of stealing trade secrets. The case was abruptly settled in February.

Uber has also had problems with its self-driving car program. In March, one of its self-driving Volvos stuck and killed a pedestrian in Tempe, Arizona. That case drew widespread scrutiny of the project — police have said the person who was in the driver's seat was likely streaming a reality TV show when the crash happened.

After that incident, Uber halted its entire self-driving vehicle program. It later said it would not return to Arizona. Only last week did Uber resume testing in Pittsburgh, with drivers in full control of the cars.

Uber has also taken steps to improve safety and efficiency within the program. It fired 100 people who sat behind the wheel of the self-driving cars, and said it would replace them with people who have more technical experience.

The company also recently hired former National Transportation Safety Board chairman Christopher Hart as an adviser.