The Spanish government had been concerned that an Italian victory could leave some of the country’s most important roads under full foreign control and the proposed joint bid, which will be made by ACS-controlled Hochtief (HOTG.DE), ensures a strong Spanish influence over the future of Abertis.

Under the terms of the proposed deal Atlantia will own 50 percent plus one share in the entity which will ultimately own Abertis, plus an additional, indirect stake through a related purchase of around 25 percent interest in Hochtief.

“This is a cooperative approach that solves many issues,” one source close to the negotiations told Reuters.

Although the deal falls short of Atlantia’s initial ambitions of exercising full control over the world’s biggest transport-infrastructure group, the Rome-based company will still expand in France, Spain, Germany and in Latin America.

It is the first foray by ACS and Hochteif into motorway concessions and they will also benefit from a strong financial partner in Abertis.

Florentino Perez, ACS’s major investor and Real Madrid soccer club chairman, and the Benetton family, which controls Atlantia, had been wrangling over Abertis since October.

Perez and Atlantia’s CEO Giovanni Castellucci led the talks to find a way out of the costly and risky bidding war, with a deal finally signed late on Tuesday in Madrid, the source said, adding that Atlantia would consolidate Abertis.

A group of banks including Credit Suisse (CSGN.S), BNP Paribas (BNPP.PA), JP Morgan (JPM.N) and Italy’s UniCredit (CRDI.MI) have arranged a 14 billion euros financing package for the deal, two other sources said.

Atlantia and ACS said in separate statements that Hochtief would first launch an 18.2 billion euro cash bid for Abertis, before transferring it to a vehicle which will be 30 percent owned by ACS and almost 20 percent by Hochtief.

A shareholders pact and a long-term contract among the three groups will set governance rules.

Some newspapers have speculated that Atlantia and ACS could choose to break up the Abertis business in the future, but the statements on Wednesday made no mention of this possibility.

Lazard (LAZ.N) and JP Morgan advised ACS and Hochtief on the deal while Credit Suisse, Mediobanca (MDBI.MI) and Santander (SAN.MC) worked for Atlantia, whose board is due to meet on Wednesday to approve the deal.