DETROIT -- By the 2025 model year, nearly all new vehicles sold in the U.S. will come with electronic alerts to remind people to not leave children behind in the back seats.

Twenty automakers representing 98% of new vehicles sold have agreed to install reminders in an effort to stop heatstroke deaths.

So far this year 39 children have died in the U.S. after being left alone in cars during hot weather. The advocacy group Kids and Cars says a record 54 children were killed last year.

Vehicles would give drivers audible and visual alerts to check back seats every time they turn off the ignition.

"Automakers have been exploring ways to address this safety issue, and this commitment underscores how such innovations and increased awareness can help children right now," David Schwietert, interim CEO of the Alliance of Automobile Manufacturers, a trade group that includes a dozen large car companies. Members of Global Automakers, an association of manufacturers based outside the U.S., also are taking part.

Automakers say the voluntary agreement will get the alerts installed faster than a government regulation, which takes four to eight years.

Only Tesla didn't agree to the reminders, but it is not a member of either trade association.

Several automakers already are offering such a feature. General Motors, for instance, has a reminder on all of its four-door sedans, trucks and SUVs starting with the 2019 model year. The system issues alerts if the rear doors were opened before the start of a trip. Hyundai has pledged to make a similar system standard on its vehicles by 2022.

The auto alliance says the agreement is a minimum and doesn't preclude automakers from coming up with more sophisticated solutions.

The U.S. House is considering a bill that would require such alerts.

Two House Democrats, Frank Pallone Jr. of New Jersey and Jan Schakowsky of Illinois, a co-sponsor of the bill, said the industry's action was a step in the right direction, but history has shown that voluntary commitments don't necessarily bring meaningful action.

"Congress must be vigilant and continue to pursue legislation that requires these companies to take the necessary steps to protect children and holds the companies accountable," they said in a statement.

Kids and Cars said that the auto industry's move is a way to avoid binding government regulations.

An alert every time a vehicle is turned off wouldn't address nearly one-third of the hot car deaths in which children get into a car on their own and become trapped, the group said in a statement.

"In order for a system to be effective and comprehensive, the system must be able to detect the presence of a rear seat occupant, not just infer that there might be one," the group said.