Image caption Gareth Montgomery-Johnson and Nicholas Davies-Jones apologised for entering Libya illegally

Two British journalists detained in Libya after admitting entering the country illegally have been released, the Foreign Office has confirmed.

Gareth Montgomery-Johnson, from Carmarthen, and Nicholas Davies-Jones, of Berkshire, were held last month.

The Libyan Interior Ministry earlier said the two men had been released and would be deported on Monday.

The journalists, who had been working for the Iranian broadcaster Press TV, have apologised for their actions.

Spying claim

A Foreign Office spokeswoman said: "We welcome the release of the two British journalists who have recently been detained in Libya.

Many journalists have entered the country technically illegally Wyre Davies, BBC News, Tripoli

"Foreign Office officials are providing them with consular assistance which we have done throughout.

"The men are in the care of consular staff, they are well and look forward to being reunited with their families soon."

In an interview on Monday morning, Mr Montgomery-Johnson's sister said she expected him to return home within the next 24 or 36 hours.

"It is quite cliched but it really has been ups and downs all the way. One day you would get a bit of positive news heading in the right direction, and then (there were) two or three days... where you just thought 'This is not going anywhere at all'. It's been a trial," Melanie Gribble told BBC 5Live.

She said her brother had told her during a phonecall on Sunday night "how tired and weary and exhausted they were, that they were looking forward to coming home".

Mr Montgomery-Johnson and Mr Davies-Jones were taken into detention by the Misrata Brigade militia in Tripoli on 22 February.

They were initially accused of spying, and it had previously been feared that the two men may face charges.

Last week they appeared in a video apologising for entering Libya without authorisation but saying they had been treated well.

Mr Montgomery-Johnson's family and human rights groups lobbied for the men to be handed to the Libyan authorities, and this was done on 14 March.

Safe and well

Deputy Interior Minister Omar al-Khadrawi was quoted by the AFP news agency as saying: "The interior ministry granted their release when it became obvious that no crime had been committed.

"They have expressed a desire to leave Libya."

BBC correspondent Wyre Davies, in the Libyan capital Tripoli, said that being employed by Iranian-sponsored Press TV may have counted against the men.

"In the past it has been accused of being pro-Gaddafi, against the revolution," he said.

"I think it was more for that reason they were detained than any issue with visas, because many journalists have entered the country technically illegally."

Our correspondent said he understood the men were safe and well, and had spoken to their families by telephone.