Madrid: Britain on Thursday rejected possible international military action in Libya and ruled out lifting an arms embargo on the country until it forms a unified government.

Foreign Secretary Philip Hammond insisted on a "political solution" for Libya, where Western governments fear the armed extremist group calling itself Islamic State may expand.

"We don`t believe that military action can solve the problem in Libya," Hammond said at a joint press conference in Algiers with his Algerian counterpart Ramtane Lamamra.

"The Algerian position and the British position are identical... we believe in an inclusive political solution in Libya," Hammond said.

Western powers this week dismissed calls from Egypt for international military action after Cairo launched air strikes on jihadists from the Islamic State group who beheaded a group of Egyptian Christians in Libya.

Egypt later instead asked for the lifting of a UN arms embargo on Libya`s internationally recognised government so it could tackle the jihadists, which the Security Council was reported to be considering.

Hammond, whose country holds a permanent seat on the council, said however it was too dangerous to let arms pour into the country.

A NATO air campaign in Libya in 2011 backed the uprising that ousted and killed dictator Moamer Kadhafi. Rival militias are now battling for control of the country`s cities and oil.

Wary of committing to fresh action in Libya, Western powers have pushed instead for political talks on forming a government of national unity.

In Libya`s western neighbour Algeria, Lamamra also rejected a military solution, saying "an escalation by providing arms" would not be conducive to talks.

"As neighbours of Libya we want to be a big part of the solution and in no way part of the problem," he said.

Libya has descended into chaos since the 2011 revolt, with the internationally recognised government forced to flee to the country`s east and militias in control of Tripoli and other main cities.

The country has two rival governments and parliaments, one recognised by the international community and the other with ties to Islamists.

With the country thus divided, "there isn`t a Libya military that the international community can effectively support", Hammond said later Thursday in Spain, which this year is a non-permanent member of the UN Security Council.

"Simply pouring weapons into one faction or the other... is not going to bring us to a resolution of the crisis in Libya, and it`s not going to make Europe safer."