European Union and U.S. negotiators have reached agreement on how to share information about passengers flying to the U.S. from Europe, a Finnish government spokesman said Friday.

The new deal allows many more U.S. government agencies to access the data, which includes details such as a passenger’s name, address and credit card details.

The agreement replaces one that was thrown out on a technicality by Europe’s top court in May.

U.S. Homeland Security Secretary Michael Chertoff has complained that the old agreement, which barred government agencies outside the customs and immigration offices from gaining access to the data, was hampering the U.S. in its fight against terrorism.

Finland, holder of the six-month rotating presidency of the EU, helped broker the deal after the two sides reached an impasse at the end of last week.

Failure to strike a new deal would have left airlines in legal limbo, facing major disruptions, fines and the possible loss of landing slots in the U.S. if they didn’t provide the information the U.S authorities want, and data protection lawsuits in Europe if they did hand the information over.