MADRID (Reuters) - Spain's ACS and Italy's Atlantia agreed terms on Wednesday to jointly take over Abertis, ending a potential bidding war for the Spanish highway concessions group.

Under the new terms, Atlantia will withdraw its offer for Abertis and ACS's German arm Hochtief will make a 18.36 euros ($22.70) per share cash offer which values the Abertis at more than 18 billion euros.

Atlantia and ACS agreed to create a 7-billion-euro holding company in which the Italians will take 50 percent, plus one share, ACS will take 30 percent and Hochtief the remainder.

ACS said it would subscribe to a 6.43-million-share capital increase by Hochtief at 146.42 euros per share. It will then sell Hochtief shares to Atlantia worth up to 2.5 billion euros, giving the Italian group an almost 25 percent stake.

($1 = 0.8088 euros)

(Reporting by Carlos Ruano; Writing by Paul Day; editing by Jason Neely)