Libyan militiamen man a checkpoint outside Tripoli, Libya, Saturday, June 7, 2012. Since the NATO-led bombardment of Libya in 2011, which resulted in the ouster of strongman, Moammar Gadhafi, Libya has been in a state of virtual chaos as a security vacuum has created a safe haven for groups such as Ansar Al Sharia and other militant groups.

STUTTGART, Germany — The Pentagon said on Monday it is drawing up plans to train up to 8,000 Libyan troops as that country’s government struggles to deal with rising violence by heavily armed militia units.

Spokesman Col. Steven Warren told reporters at the Pentagon that details of the training were still being worked out, including which U.S. Army conventional forces units would conduct it and what Libyan units would receive it.

“We’re in discussions with Libyans on the exact number [of troops], but we’re prepared to provide training for 5,000 to 8,000 personnel,” Warren said. “This is essentially basic training.”

Dates have not yet been set, Warren said.

Since the NATO-led bombardment of Libya in 2011, which resulted in the ouster of strongman Moammar Gadhafi, Libya has been in a state of virtual chaos as a security vacuum has created a safe haven for groups such as Ansar Al Sharia and other militias.

The precarious security situation was underscored last week, when militiamen opened fire on peaceful demonstrators in the capital, Tripoli, killing more than 40 civilians. In October, Prime Minister Ali Zeidan was briefly taken captive by gunmen, a few days after a raid by U.S. special operations snatched a high level al-Qaida operative from the streets of the capital.

A year earlier, on Sept. 11, 2012, militants also were responsible for the strike on the U.S. diplomatic facility in Benghazi, which left four dead, including U.S. Ambassador Christopher Stevens.

Reacting to the continuing bloodshed, which prompted warnings of a possible civil war unless the armed groups are reined in, Libya’s weak central government has appealed for help from the international community.

“At the request of the Government of Libya to the U.S. and other partners, we are coordinating with Libya and other partner nations how we can best help strengthen the region’s security,” U.S. Africa Command spokesman Benjamin Benson said in a statement. AFRICOM is to coordinate the training.

“The planning and coordination is ongoing and I cannot provide further details at this time,” Benson said.

The U.S. and its allies in NATO have been examining potential training initiatives for months.

In October, NATO, in response to a request for support from Libya, said it would help the country build up its military.

Adm. William McRaven, head of U.S. Special Operations Command, said over the weekend that the project will involve conventional and special operations forces.

However, the initiative also runs the risk that the U.S. will be forced to deal with recruits with checkered personal histories, McRaven said, according to several media accounts of his remarks during a panel discussion on the war on terrorism at the Reagan National Defense Forum.

“We are going to have to assume some risks,” McRaven was quoted as saying by the Washington Free Beacon website. “Right now we have the authorities to do that training, and I think as a country we have to say there is probably some risk that some of the people we will be training with do not have the most clean records. But at the end of the day it is the best solution we can find to train them to deal with their own problems.”

McRaven, according to several media accounts from the Saturday event in California, said the military would conduct a “thorough review” of Libyan troops as part of the vetting process.

“And we have a complementary effort on the special operations side to train a certain number of their forces to do counterterrorism,” McRaven said. Bulgaria has been cited as one possible location for the mission.

Stars and Stripes reporter Chris Carroll contributed to this report.

vandiver.john@stripes.com