Media playback is unsupported on your device Media caption David Cameron on "removing any stain from Britain's reputation"

Allegations that MI6 was involved in the rendition of Libyan terror suspects will be examined by an existing inquiry, David Cameron has said.

It comes after papers suggesting close ties between MI6, the CIA and the Gaddafi regime were found in Tripoli.

Sir Peter Gibson's inquiry into alleged involvement in torture by UK security agencies has said it will investigate.

A former Libyan foreign minister has claimed MI6 was co-operating with the old regime until about six months ago.

Meanwhile UK officials, including staff from the Foreign Office and Department for International Development, have arrived in Tripoli to re-establish a diplomatic presence in Libya.

Making a statement on Libya in the Commons earlier, Prime Minister David Cameron said: "We've asked the retired judge, Sir Peter Gibson, to examine issues around the detention and treatment of terrorist suspects overseas and this inquiry has already said it will look at these latest accusations very carefully.

"My concern throughout has been not only to remove any stain on Britain's reputation but also to deal with these accusations of malpractice so as to enable our security services to get on with the vital work that they do."

Opposition leader Ed Miliband said he agreed with the prime minister "that the Gibson inquiry must get to the bottom of the allegations".

Analysis What these documents appear to show is that Britain was turning a blind eye to maltreatment, and that's really the question that's going to have to be answered by the government. This whole thing smells very bad. You couldn't find a more embarrassing example of collusion with a very unpleasant regime, by an arm of British government. A Whitehall spokesperson told me there were three points they would make. The first is that MI6 is tasked by the foreign secretary, who they have their dealings with. Secondly, they said they always act within the law. Thirdly, they seek assurances that there won't be mistreatment of people when they're handed over. Those assurances look pretty hollow because Gaddafi's regime was notoriously brutal, as are many of the regimes that people have been dealing with. I think the reason that they would give for dealing with Gaddafi's regime - and this is certainly not going to satisfy a lot of people - is that they needed to dismantle their active WMD programme. Questions over Libya-Britain ties

Jack Straw, who was UK Foreign Secretary between 2001 and 2006, told MPs he supported calls for an inquiry.

Mr Straw earlier told BBC Radio 4's World at One programme he did not know whether allegations that UK security services were involved in the rendition of Libyan terror suspects were "credible".

But he said the claims were a source of concern and "must be examined in very great detail" by the Gibson inquiry.

A statement from the Detainee Inquiry, to be chaired by Sir Peter Gibson, said that as part of its role of examining the extent of the government's involvement in, or awareness of, improper treatment of detainees, it would "therefore, of course, be considering these allegations of UK involvement in rendition to Libya as part of our work".

The commander of anti-government forces in Tripoli, Abdel Hakim Belhaj, said he was taken to Libya in a CIA and MI6 operation in 2004 after being arrested in Bangkok.

Mr Belhaj, then a terrorist suspect, said he was tortured in Libya.

This appears to be confirmed by documents discovered in an abandoned office building in Tripoli by staff from Human Rights Watch.

The papers relating to Mr Belhaj have been seen by the BBC's Middle East editor Jeremy Bowen.

Mr Belhaj told the BBC: "What happened to me and my family is illegal. It deserves an apology. And for what happened to me when I was captured and tortured."

The Foreign Office said the government had a "long-standing policy" not to comment on intelligence matters.

Andrew Tyrie, chairman of the All Party Parliamentary Group on Extraordinary Rendition, said: "These further allegations must be fully investigated by the Gibson inquiry. David Cameron was right to set this up. The inquiry itself must demonstrate that it is up to the job.

Media playback is unsupported on your device Media caption Abdel Hakim Belhaj told the BBC what happened to him was illegal and he wants an apology

"Unfortunately, Sir Peter Gibson's early decisions - not to appoint an investigator, not to look at detainee transfer in theatre, not to sufficiently engage with the victims - do not inspire public confidence."

Other documents found by Human Rights Watch workers are reported to suggest that MI6 gave the Gaddafi regime details of dissidents.

Meanwhile, Abdelati Obeidi, former Libyan foreign minister under Col Muammar Gaddafi, has spoken to Jeremy Bowen in Tripoli.

Our correspondent said Mr Obeidi, 71, who is now in custody, was deeply involved in all the major diplomatic encounters between Libya and the West for more than a decade.

Mr Obeidi confirmed that MI6 was operational in Tripoli until the start of the Libyan revolution in February.

But the ex-minister said relations between the Libyan and British secret intelligence services were not as close as when his predecessor Moussa Koussa was in charge.