Britain's defence ministry has said it is cutting short a training programme in the UK for Libyan troops after reported sexual assaults allegedly involving five of the servicemen.

About 300 members of the troubled north African country's armed forces have been based at the Bassingbourn Barracks in Cambridgeshire, eastern England, since July.

"Training was initially expected to last until the end of November but we have agreed with the Libyan government that it is best for all involved to bring forward the training completion date," the ministry said in a statement on Tuesday.

"The recruits will be returning to Libya in the coming days."

Three of the Libyan soldiers were due in court in Cambridge on Tuesday.

Two of them have each admitted two counts of sexual assault.

The third has been charged with three counts of sexual assault but has yet to enter a plea, British media reported.

Two other servicemen have been charged with raping a man, the Cambridge News website reported.

"The majority of recruits have responded positively to the training despite the ongoing political uncertainty in Libya but there have been disciplinary issues," the ministry said.

It said the government would now "review" whether to continue training Libyan recruits in Britain.

Andrew Lansley, the local MP, said he had written to the defence ministry to raise his concerns and warned he would oppose any more Libyan troops being hosted at the base.

"It is clear that the stipulation that there was to be no unauthorised exit from the base has not been adhered to and the consequences have been unacceptable," he said.