In the print ad, the rivals say they have both "invested over £15bn in the UK’s infrastructure in the last five years".
The pair is fighting against calls to sell Openreach, BT's network division. All of BT's rivals, apart from Virgin Media, rely on Openreach to serve their customers, so a sale would increase competition in the marketplace for Virgin Media.
The ad claims that over the five years, UK broadband speeds "have more than quadrupled" and that download speeds are faster than in Germany, France, Italy and Spain.
It adds: "UK companies expect to create more than a million new jobs to meet growth in the digital economy. The future is digital and we want the UK at the heart of it."
The ad will run for one month from today in all national newspapers, apart from tabloids, and some magazines.
Gavin Patterson, chief executive at BT, said: "BT and Virgin Media may be commercial rivals but we both have a proud track record of investing billions of pounds in the UK’s digital infrastructure.
"It’s important post-Brexit that we don’t talk the country down and that the right climate exists for further investment."