(Adds comments on kidnapped Tunisians, background)
By Feras Bosalum
TRIPOLI, April 28 (Reuters) - Jordan has agreed to handover a Libyan Islamist to Tripoli to secure the release of its ambassador kidnapped in the North African country two weeks ago, Libya's state news agency LANA said on Monday.
Jordan's ambassador to Libya, Fawaz al-Itan, was snatched by gunmen who demanded the release of Mohamed Dersi, a Libyan Islamist militant jailed for life in 2007 for plotting to blow up the main airport in Jordan.
Sohar Banun, an undersecretary in Libya's justice ministry, said both countries had agreed that the ambassador would be released in exchange for Jordan reducing Dersi's sentence and allowing him to complete his jail term in Libya, LANA said.
"The Jordanian authorities expressed their total readiness to solve this crisis, confirming that the ambassador will be released in exchange for reducing the term of the Libyan prisoner and sending him home to complete his sentence," he said according to the agency.
"The crisis will be solved according to a memorandum of understanding between the two countries," said Banun, who heads a department taking care of Libyans jailed abroad.
He gave no details or time frame, and there was no immediate comment from Jordanian or Libyan officials.
Analysts have said agreeing to the kidnappers' demand could set a dangerous precedent for Jordan, which is an important U.S. ally in the fight against al Qaeda.
Kidnappings have become commonplace in Libya, with foreign diplomats often the targets.
Libyan Islamists have also seized two Tunisian diplomats to demand the release of fellow militants jailed in Tunisia for attacking security forces there in 2011, according to the Tunisian government.
Banun hinted at movement in efforts to get the Tunisians released.
"Regarding the file of Libyans jailed in Tunisia ... Tunisia confirms its wish to cooperate with the Libyan government, especially with the kidnapping of the Tunisian diplomats," he said according to LANA.
He did not elaborate.
The weak interim government has been unable to disarm former rebels and Islamist militants who fought in the uprising that deposed leader Muammar Gaddafi in 2011 and who have formed increasingly powerful and violent militias.
Two weeks ago the interim prime minister resigned after just a month into the job, saying gunmen had tried to attack his family.
Tribal groups, militias and even local citizens are also resorting to road blockades as a negotiating tactic. Some rebel groups have also shut down the OPEC member's oil facilities, raising supply concerns on global oil markets. (Reporting by Feras Bosalum and Ulf Laessing; Editing by Toni Reinhold)