By Louis Charbonneau

UNITED NATIONS (Reuters) - U.N. Security Council members have agreed to impose an arms embargo on Eritrea this month, as well as travel bans and asset freezes for government and military leaders aiding Somali insurgents, diplomats said.

The United States and other council members accuse Eritrea of supplying Islamist rebels with money and weapons in their fight to topple the fragile U.N.-backed transitional government in Somalia, a virtually lawless Horn of Africa nation.

Western diplomats on the 15-nation Security Council said most members of the panel have agreed to support a Ugandan-drafted resolution to punish Eritrea and that they hoped to approve it by next week.

Reuters obtained the latest draft resolution on Wednesday.

In addition to imposing sanctions on Eritrea, the resolution orders Asmara to end all support to "to armed groups and their members, including al Shabaab," which is battling to oust Somali President Sheikh Sharif Ahmed.

Speaking on condition of anonymity, the diplomats said they were not expecting a unanimous vote, as Libya has made clear it would vote against the resolution. But they said they were ready to make further revisions to secure Tripoli's vote.

Russia and China, which are generally reluctant to back sanctions, came around after it became clear the overwhelming majority of African Union members support taking the action against Somalia's neighbour, diplomats said.

"We've got a balanced resolution that is tough, which imposes sanctions on Eritrea and the key elements in Eritrea who are supporting the Somali rebels," a diplomat said. "I think we'll get 14 votes."

LIBYAN OPPOSITION

Western Security Council members had originally expected negotiations on the resolution to run into next year. But diplomats said an agreement had emerged after Russia and China took an "unusually cooperative" stance on the resolution.

They said the opposition of Libya, currently the chair of the African Union, was somewhat puzzling since the AU officially supports the idea of U.N. sanctions against Asmara.

The measures spelled out in the latest draft resolution are essentially the same as in the original text circulated to Security Council members last month.

They include a ban on sales of "arms and related materiel of all types" to Asmara, as well as arms sales by Eritrea. They also authorise U.N. member states to inspect cargo and seize any banned items being transported to or from Eritrea.

Once the resolution is passed, the council's Somalia sanctions committee will have to designate which individuals and firms will face U.N. travel bans and asset freezes.

Some Somali rebels took refuge in Eritrea after being ousted from the Somali capital Mogadishu when Ethiopian troops entered Somalia in 2006.

The Security Council, African Union and United States have all warned Asmara against destabilizing Somalia. Eritrea denies supporting al Shabaab and says there is no justification for imposing the sanctions.

A U.N. arms monitoring body, which was set up to record violations of a 1992 arms embargo on Somalia, has said Asmara was flying and shipping munitions to Somali rebels, as well as providing them with logistical support.

Somalia has been mired in chaos for nearly two decades and there is little sign the latest attempt to establish a central government is proving any more successful than the 14 previous efforts since a dictator was ousted in 1991.

(Editing by Paul Simao)