U.S. military working on plan to train thousands of Libyans WASHINGTON (Reuters) - The U.S. military is working on plans to train 5,000 to 7,000 members of the Libyan security forces and also special operations forces who can carry out counter-terrorism missions, a senior U.S. military official said. Libya's government is struggling to keep order as rival militias and hardline Islamists refuse to disarm two years after Muammar Gaddafi was ousted in a NATO-backed uprising. Tripoli has seen deadly clashes over the past several days. Admiral William McRaven, who heads the U.S. military's Special Operations Command, declined to go into details about the training plan, saying these were still being negotiated. Suffice to say that there is going to be a kind of conventional effort, to train their conventional forces, between 5 and 7,000 conventional forces. And we have a complementary effort on the special operations side to train a certain number of their forces to do counter-terrorism," he told a defense forum in California at the weekend. McRaven said there would be extensive vetting of Libyan personnel trained by the United States. However, he acknowledged vetting could only do so much in Libya, where militiamen and former fighters are often employed by the government to protect ministries and government offices. Those gunmen remain loyal to their commanders or tribes and often clash in rivalries over control of territory. "Right now 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 told the forum late on Saturday. 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. A U.S. defense official, speaking to Reuters on condition of anonymity, said U.S. plans would involve training of small groups on a rotational basis over years in Bulgaria. The official said many details still needed to be worked out before training could move forward. In September, Bulgaria's defense minister was quoted saying in press reports that the United States aimed to carry out the training of Libyan forces in his country over a period of up to eight years. France said this month it was considering offering more counter-terrorism training and aid to help Libya prevent militancy spilling over its frontiers. Reporting by Phil Stewart; Editing by David Brunnstrom