WASHINGTON (AP) — Are your car's headlights keeping you in the dark?

The beams on most cars aren't doing a good job of helping drivers see down a dark road at night, according to rating of more than 30 midsized car models.

Only one model, the top trim level Toyota Prius V, earned a grade of good. Of the rest, about one-third were rated acceptable, one-third were marginal and one-third were poor.

The difference between the top- and bottom-rated models for a driver's ability to see down a dark road was substantial, according to the study released Wednesday by the Insurance Institute for Highway Safety, an industry-funded organization that evaluates automotive safety.

The LED headlights in the Prius V tested were able to illuminate a straight roadway sufficiently to see a pedestrian, bicyclist or obstacle up to 387 feet ahead. At that distance, the vehicle could be traveling up to 70 mph and still have time to stop.

But halogen headlights in the BMW 3 series, the worst-rated models, were able to illuminate only 128 feet ahead. At that distance, the vehicle couldn't be traveling at more than 35 mph and still have time to stop, according to the study.

That's important because of the more than 32,000 traffic deaths last year, about one-half occurred at night or during dawn and dusk when visibility is lower.

The reason for the big performance gap is that there's a lot more to how well headlights help drivers see than merely the brightness of the bulb or even what type of bulb is used, said David Zuby, the institute's executive vice president and chief researcher.

"We found the same light bulb, depending upon what reflector or lens it's paired with and how it's mounted on the vehicle, can give you very different visibility down the road," he said.

It gets more complicated.

Consumers cannot buy a more expensive model or add an expensive technology package and necessarily expect to get better headlights, the report said.

The halogen headlights in the economically priced base model four-door Honda Accord, for example, earned an acceptable rating while halogen and LED headlights in two pricier Mercedes-Benz models were rated poor.

Zuby said with no reliable clues such as the price of the car or the type of light, it's hard for consumers to figure out which vehicles will provide the safest visibility. He recommended car buyers check the institute's ratings at http://www.iihs.org.

The report comes as halogen lamps are being replaced by high-intensity discharge (HID) and LED lamps in many vehicles. Headlights that swivel with the car's steering to help see around curves are also becoming more widespread. While these changes can have advantages, they do not guarantee good performance, the report said.

Researchers tested the headlights after dark at the institute's test track in Ruckersville, Virginia. A special device measured the light from both low beams and high beams as the vehicles were driven on five different approaches: traveling straight, a sharp left curve, a sharp right curve, a gradual left curve and a gradual right curve. Researchers also evaluated headlights for excessive glare.

They were surprised to find how much headlights varied from the base model to higher trim or accessory packages, Zuby said.

Eighty-two different headlight systems were available for the 31 2016 models assessed in the study. To get the top-rated headlights in the Prius V, consumers would have to purchase the advanced technology package, which is only available in the top trim level. Standard halogen lights without high-beam assist in less expensive Prius V trim levels received a poor rating.

High-beam assist automatically adjusts the headlamp range for the distance of vehicles ahead or oncoming traffic.

Toyota officials declined to comment.

BMW said in a statement that the company was disappointed by the ratings, but remains confident that its headlight systems are "very effective" for a variety of differently priced models.

Mercedes-Benz said in statement that it was "greatly surprised" by the test, and remains "confident our lighting systems provide important safety benefits for real world conditions."

Government standards for judging the performance of headlights "are essentially unchanged" since they were set back in the 1960s, Zuby said.

"In the standard, they are measuring the light coming out of the light source — right in front of the light bulb, in essence — and not looking at how the light is projected down the road, which is what our tests do," he said.

The institute hopes its study will encourage the National Highway Traffic Safety Administration to improve standards, or inspire automakers to make better headlights on their own, Zuby said.

___

Follow Joan Lowy at twitter.com/AP_Joan_Lowy. Her work can be found at http://bigstory.ap.org/content/joan-lowy