DETROIT — Eighteen automakers joined with the government Friday in committing to exploring new ways to improve automotive safety.

They also expressed a willingness to share some information or best practices about ways to track data and defects.

The commitment comes on the heels of a two-year period of automotive history characterized by record-setting numbers of recalls, record civil penalties levied by the National Highway Traffic Safety Administration and a number of Congressional hearings to investigate companies including General Motors, Takata and Fiat Chrysler Automobiles.

But this week, at several events and news conferences, the U.S. government stressed that it is less interested in pushing for recalls and levying fines after safety problems occur and more interested in preventing safety defects before they occur.

“Today, the Department of Transportation and the automakers represented here are taking a strong stand in favor of a new approach, an approach that leans heavily on being proactive, and less heavily on being reactive,” U.S. Transportation Secretary Anthony Foxx said on Friday at the Detroit auto show.

Foxx outlined four broad principles that automakers agreed on. They include a commitment to explore the possibility of sharing traffic and safety data as well as some research and development.

“Perhaps years from now we will look back at this moment, at a time when there may have been some skepticism about the safety of the automotive industry in general, and see that the industry stepped up and made a hard pivot with us towards a more proactive culture,” Foxx said.

The agreement is modeled after the Federal Aviation Administration’s Safety Management System. That system allows airlines to share data anonymously that helps to improve safety and avoid crashes.

Foxx said the FAA’s system “has dramatically reduced aviation accidents in our skies and it relies on information sharing and the trust established by FAA and  its stakeholders.”

Foxx and National Highway Traffic Safety Administration chief Mark Rosekind were flanked by a number of top automotive executives, including Fiat Chrysler Automobiles CEO Sergio Marchionne, Toyota President of North America Jim Lentz, Hyundai North America President and CEO Dave Zuchowski and General Motors CEO Mary Barra.

“I see this as a real opportunity and a foundation that we can build on,” Barra said. “I do think we will look back and see that this was very historic.”

Fiat Chrysler CEO Sergio Marchionne said earlier this week that he appreciates the new approach that Rosekind is taking, even though the Auburn Hills automaker was subjected to $175 million in civil penalties.

“I think Rosekind is trying to transition NHTSA into a different kind of relationship with the (manufacturers),” Marchionne said after a meeting on Tuesday. “I agree with the end goal. We aren’t going to agree with each other every step of the way.”