WASHINGTON — New cars and trucks will have to work harder to make the grade in the government’s safety ratings program.

The Transportation Department said the upgrades to the 5-Star Safety Rating System will make it more difficult for new vehicles to earn top scores of five stars. Consumers use the “Stars on Cars” system to assess and compare a vehicle’s safety value, which is posted on window stickers adorning cars and trucks in dealer lots.

The 2011 BMW 5 Series and a version of the 2011 Hyundai Sonata were the only vehicles to get five stars out of an initial testing of 34 vehicles. Most of the vehicles tested got four stars. The department intends to test another 21 vehicles this year.

The Toyota Camry, the best-selling passenger car in the United States, received three stars overall and the compact Nissan Versa got two stars overall, underscoring the challenges of the new system. Camrys from the 2010 model year received five stars in both front and side testing while 2010 versions of the Versa got four stars in front and side testing.

Toyota said it anticipated that the ratings for Camry could drop even if the vehicle’s design hadn’t changed between model years. Toyota engineers are “investigating measures to further enhance safety performance” for Camry, the company said. Nissan said its customers receive “good real-world safety protection” in the Versa but that it would study the test results.

The program, which evaluates vehicles on front-end and side-impact crashes and rollovers, was started in 1979 and has helped generate interest in safety equipment such as side-impact air bags and anti-rollover technology. The government decided to revamp it for the 2011 model year because too many vehicles were getting top marks, making it difficult to distinguish the best performers.

Transportation Secretary Ray LaHood said the changes would subject vehicles to more rigorous crash tests and help car shoppers “navigate a crowded marketplace with trustworthy and objective safety analysis.”

The ratings range from one to five stars, with five being the highest and one the lowest.

The new system adds an overall score, uses different-size test dummies and takes into account crash-prevention technologies and a new test that simulates a car striking a pole or a tree. The overall score combines the results of front, side and rollover tests and compares those results with average risk of injury and the potential for vehicle rollover of other vehicles.

For the first time, the tests will include dummies representing women. The dummies also will collect data about a wider variety of injuries.

Because of the changes, consumers will not be able to compare the score of a new 2011 model year vehicle with results of a 2010 model year vehicle. The window sticker affixed to vehicles at dealerships will need to be redesigned and will not include the overall score until the 2012 model year. Vehicles that have not been tested will be listed as “not rated.”

Auto companies said the changes will mean the ratings will probably go down for most cars and trucks, even if there have been no significant changes to the vehicle. Automakers had been concerned consumers might be confused initially but said they support the changes.