Seven U.S. air carriers said Friday that they will begin collecting information from international passengers intended to help health officials more quickly warn travelers if they have been exposed to the coronavirus on a flight.

The announcement is a turnabout for the industry, which previously pushed back against government efforts to require it to provide passenger information for contact tracing.

Last February, the Department of Health and Human Services issued an interim rule that would have required airlines to collect key information from international passengers, including emails and cellphone numbers. When ordered, airlines would have been required to provide it within 24 hours so officials could warn travelers about exposures.

But airlines balked, saying that they didn’t have systems in place to provide the information in the time frame the government requested and that it could take a year to set them up. Airlines for America, a lobbying group that represents the industry, also argued that collecting the data shouldn’t be the carriers’ job since the government already had much of it in databases.

The group did offer an alternative: It said it would pay to create a separate website and app that could be used to collect passenger data. They were developed but never used.

While airlines do provide passenger information to help with contact tracing, federal health officials sought the change because it can take nearly two weeks to receive the data under existing regulations. Given the incubation period for the virus, officials hoped the new rule would enable them to get information faster.

“If an efficient contact system is not in place when the first ill passengers arrive, the benefits of the contact tracing are greatly diminished,” HHS said in announcing the rule.

On Friday, Airlines for America said airlines had made enough progress to put a voluntary program in place.

Under the plan, Alaska Airlines, American Airlines, Delta Air Lines, Hawaiian Airlines, JetBlue Airways, Southwest Airlines and United Airlines said they will begin collecting information from travelers on U.S.-bound flights. Passengers can voluntarily provide the information, which will include their legal name, two phone numbers, an email address, and the address of the place where they will be staying in the United States or of their permanent U.S. residence.

“We are hopeful that this measure, coupled with existing testing requirements for passengers flying to the U.S., will lead policymakers to lift travel restrictions so that international travel can resume and the social and economic benefits of that travel can be realized,” said Nicholas E. Calio, chief executive of Airlines for America.

Officials at the Centers for Disease Control and Prevention said the airlines’ efforts will help to control the spread of the coronavirus.

“Contact tracing is a fundamental component of the nation’s public health response strategy for controlling the spread of communicable diseases of public health concern,” the agency said in a statement. “Collection of contact information from air travelers will greatly improve the timeliness and completeness of information for COVID-19 public health follow-up and contact tracing.”

While the number of people who have flown while carrying the virus is unknown, the CDC said last year that it had investigated 1,600 cases in which travelers could have infected others. While 11,000 people could have been exposed, officials said incomplete contact-tracing information combined with the virus’s incubation period made it difficult to confirm instances in which people were infected on a flight.

Robust contact tracing — along with mask-wearing, frequent hand-washing and social distancing — has been among the key strategies that health officials say can help control the spread of the virus.

In December, Delta Air Lines announced that it would begin collecting contact information from international travelers on a voluntary basis. The information is transmitted to officials at U.S. Customs and Border Protection, which then sends it to the CDC. The airline said the new arrangement announced Friday would “dramatically decrease” the time it would take local health officials to notify customers.

United’s program also is voluntary, but in addition to requesting information from international travelers, the airline is also seeking it from those traveling domestically and those on outbound international flights. Passengers can provide their contact information via United’s website, through its mobile app or at the airport.