(CNN) -- Libya and its fledgling security forces, overwhelmed by militia violence and unrest since the overthrow of dictator Moammar Gadhafi two years ago, are going to get some help from the U.S. military, a top American commander said.
Adm. William McRaven, head of the U.S. Special Operations Command, said Saturday the United States will train 5,000 to 7,000 conventional troops as well as counterterrorism forces.
Another U.S. official told CNN the training is likely to take place in Europe once all the details are finalized.
A major challenge will be developing a security force that's not influenced by the well-armed militias that have proliferated in the lawless atmosphere across Libya.
"As we go forward to try and find a good way to build up the Libyan security forces so they are not run by militias, we are going to have to assume some risks," McRaven said.
"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 record. At the end of the day, it is the best solution we can find to train them to deal with their own problems."
He made the remarks at a defense forum at the Reagan Presidential Library in California just a day after deadly fighting in the capital, Tripoli, on Friday. State news said at least 43 people were killed and hundreds of others were wounded during clashes.
Popular sentiment against the various militias has been mounting for months in Tripoli and other parts of the country, including the eastern city of Benghazi, which has been gripped by increasing violence, including political assassinations.
The chaos in Libya hit home for Americans after U.S. Ambassador Chris Stevens and three other Americans were killed on September 11, 2012, in an attack on the U.S. diplomatic mission in Benghazi.
The United States has offered a reward of up to $10 million for information leading to the arrest of anyone involved in the attack. While U.S. authorities have filed charges in the case, no one has been arrested.
A NATO air campaign helped overthrow Gadhafi two years ago, but ever since there has been widespread unrest and poor security.
"The United States, United Kingdom, France, Italy, Germany, and the European Union have done little to follow through with an effective Libya restructural policy. They have struggled to coordinate support to address the problems with Libya's security sector and justice system," a Human Rights Watch report said in September.
Joe Sterling reported and wrote in Atlanta. Barbara Starr reported in Simi Valley, California