SAN FRANCISCO — In the fight over the future of self-driving vehicles, a bare-knuckled brawl between Uber and Waymo is coming to a head.

That was clear in a federal courthouse in San Francisco on Wednesday as the two companies clashed at a crucial hearing in a case that could halt the progress of Uber’s autonomous-vehicle research efforts. The hearing was expected to be the final court session before a federal judge decides whether to temporarily shut down Uber’s work on self-driving cars.

At the center of the dispute are allegations by Waymo, the self-driving car unit spun off by Google’s parent company, that Uber was using stolen trade secrets to develop autonomous vehicles.

The thief, Waymo maintains, is Anthony Levandowski, a former top Google engineer whose start-up was acquired by Uber last year to work on self-driving technology. Waymo has accused Mr. Levandowski of illegally downloading 14,000 documents from Google and then applying those stolen secrets at Uber.