A former senior diplomat has been appointed by the prime minister to work with the United States and other countries to ensure that British spies and police officers can access data from overseas firms.

Sir Nigel Sheinwald, former ambassador to the United States, has been appointed as special envoy on intelligence and law enforcement data sharing.

He will lead discussions with governments and communications service providers on ways to improve access to and sharing of law enforcement and intelligence data in different jurisdictions.

David Cameron set out the need for the post when he announced emergency legislation on data sharing in July.

He said: "A number of overseas companies have asserted that their ability to work with the UK government is being severely constrained by international conflicts of jurisdiction.

"For example, where they think they have a British law saying that they should share data, and an American law saying that they shouldn't."

He said the envoy would work to ensure that "lawful and justified transfer of information across borders takes place to protect our people's safety and security".

Home affairs select committee chairman Keith Vaz said: "The prime minister has made an excellent choice in selecting Sir Nigel Sheinwald for this post.

"It is vital that we work in partnership with other countries on this serious matter, particularly given the security implications of data sharing. I firmly believe that Sir Nigel has the necessary expertise and experience to carry out this role effectively.

"The committee is looking forward to working with Sir Nigel in the near future."