Publicis Groupe agencies will now run the account accross Telefónica's 16 markets. It was one of the incumbents, alongside other agencies including WPP's Mindshare and Havas Media's Arena.
ZenithOptimedia also retained its business in Germany, and picked up Telefónica's home market of Spain, which is currently handled by Arena.
Starcom MediaVest, ZenithOptimedia’s sister Publicis Groupe media agency, will handle the Latin American market, where it already held the business in some countries.
Telefónica will work with Arena in Spain and Mindshare, which held the account in Argentina, until Publicis' new contract begins on 1 January 2015.
Dentsu, Havas, Publicis and WPP took part in the pitch process. In a statement, Telefónica said it valued the "digital positioning" of Publicis.
It also thanked Arena and Mindshare, saying: "These agencies have shown professional capacity and a good performance in these countries and Telefónica is grateful for all their effort and professionalism."
Telefónica estimated to spend £200 million in its European markets alone.
O2 spent £49 million in the UK in the year to September 2012, according to Nielsen. The telecoms brand was the 18th-biggest-spending advertiser in the UK during that period.