The two groups, who already had an agreement to share new network sites, said they would strengthen their partnership by pooling their basic network infrastructure to take their national population coverage to 98 percent by 2015.
The agreement will also allow the groups to build two competing fourth generation networks faster than could have been achieved independently.
"Exceptional customer demand for the mobile internet has challenged the mobile industry to consider innovative solutions to building a nationwide network that will be fit for our customers in the future and support the products and services that will truly make Britain digital," Ronan Dunne, Telefonica UK chief executive said.
"This partnership is about working smarter as an industry, so that we can focus on what really matters to our customers - delivering a superfast network up to two years faster than Ofcom envisages and to as many people as possible."
The deal will keep costs down for both groups at a time when they are struggling with weak customer spending in Europe. Telefonica is particularly under pressure to cut its debt pile and is currently stepping up plans to dispose assets.
The two groups will form a joint venture to run the grid but they will still run independent spectrum and competing services off the infrastructure.