Reports based on disclosures by former U.S. intelligence contractor Edward Snowden alleged Washington had conducted mass surveillance in Germany and had even eavesdropped on Chancellor Angela Merkel's mobile phone.

Berlin subsequently demanded talks with Washington on a "no-spy" deal, but these collapsed after the United States appeared unwilling to give the assurances Germany wanted.

Germany also launched an overhaul of its internal communications and secure government networks. This is one of the first actions involving a U.S. firm to result.

"The pressures on networks as well as the risks from highly-developed viruses or Trojans are rising," Germany's Interior Ministry said in a statement on Thursday.

"Furthermore, the ties revealed between foreign intelligence agencies and firms in the wake of the U.S. National Security Agency (NSA) affair show that the German government needs a very high level of security for its critical networks."

The government said Deutsche Telekom AG would replace services provided by Verizon, and noted Deutsche Telekom was already responsible for the most sensitive communications between ministries or between the government and German intelligence agencies.

Information on the value of the contract was not immediately available.

According to reports and documents published last year, Verizon was obliged to turn over international and domestic calling records of its customers to U.S. intelligence agencies.

Verizon is the second-biggest U.S. telephone company behind AT&T Inc in terms of revenue.

Detlef Eppig, head of Verizon's German unit Verizon Germany said on Thursday: "Verizon Germany is a German company and we comply with German law."

Verizon did not receive any demands from Washington in 2013 for data stored in other countries, the company said.

"The U.S. government cannot compel us to produce our customers' data stored in data centres outside the U.S., and if it attempts to do so, we would challenge that attempt in a court," it added.

The firm declined to comment on whether there had been requests in previous years.

(Reporting by Thorsten Severin; Writing by Alexandra Hudson; Editing by David Holmes)