SAN FRANCISCO — Companies from Silicon Valley to Detroit to Germany are developing cars that park, steer and even drive themselves. Now the federal agency for traffic safety has said it wants to come along for the ride.

On Thursday, the Transportation Department made its first formal policy statement on autonomous vehicles. In a nonbinding recommendation to the states, it said that driverless cars should not yet be allowed, except for testing. But it said that semiautonomous features, like cars that keep themselves centered in lanes and adjust their speed based on the location of the car ahead, could save lives.

The statement, from the department’s highway safety agency, comes as companies, led by Google, have made significant technological strides in making cars that drive themselves, but still face daunting legal, regulatory and cultural hurdles before the cars are widely available to drivers. It is the latest example of the tension between technological innovation and regulation, which move at very different speeds.

It is also a time of rapid change, and some anxiety, about autonomous systems in general. The transportation department is struggling, for instance, to determine how to regulate drone aircraft.