Updated

The chairman of the House Armed Services Committee is intent on barring private security contractors and Afghans from guarding U.S. bases in Afghanistan, a move that could complicate President Barack Obama's timetable for withdrawing American forces after more than a decade of war.

Rep. Howard "Buck" McKeon, R-Calif., introduced the legislation on Thursday in response to the insider attacks by Afghan security forces against U.S. and other coalition troops. McKeon held a hearing last month in which the military said more than 45 insider attacks have occurred since 2007 – 75 percent in the past two years.

In a recent spate of anti-American violence touched off by the burning of Muslim holy books at a U.S. base last week, two U.S. troops were gunned down by two Afghan soldiers and an accomplice on Thursday. All told, six Americans have been killed by their Afghan partners in recent days.

"War is bad enough that we put our young people out there at risk," McKeon said in an interview taped for C-SPAN's "Newsmakers." "They shouldn't have to worry about security within the base."

The legislation would require the president to ensure that there are enough trained members of the military to fight the war in Afghanistan as well as provide security for American troops. If the president refuses, he must certify to Congress that private security contractors or the Afghan Public Protection Force can provide protection that is at least equal to the U.S. military.

The bill would prohibit the president from shifting troops from current operations in Afghanistan to protect bases. Such a step would force the president to increase the number of troops in the country – a move certain to face strong opposition in a war-weary Congress.

The United States and its NATO partners agreed in late 2010 to end the combat mission in Afghanistan by the end of 2014. The mission would transition to an operation focused on training and advising Afghan forces. Obama plans to reduce the total U.S. military presence to 68,000 by the end of September from the current level of about 90,000 U.S. troops.

McKeon disagrees with that timetable.

"I think the president bringing these 20,000 troops home this year is too soon," he said in the interview. "I know there's disagreement on that, but my feeling is I would like to see them stay in theater through the fighting season."

Frustration with the decade-plus war has increased in Congress, reflected in votes last year in both the House and Senate, and more recently in congressional hearings with Secretary of State Hillary Rodham Clinton this week. Several lawmakers questioned the continued U.S. presence as anti-American protests claimed U.S. lives.

The military said last month that most of the attackers acted out of personal motivation and were not controlled or directed by insurgent groups. The second most common circumstances involved insurgents impersonating or infiltrating Afghan security forces. Defense officials have spelled out a screening process for Afghan nationals who are used to provide security for U.S. forces. That program incorporates some improvements made after the March 2011 attack at Forward Operating Base Frontenac that killed two U.S. soldiers and wounded four others.

One of the two killed was Army Spc. Rudy Acosta, who was from McKeon's congressional district.

"The tragedies that those parents had to deal with, the parents in my district, and the other young man was from Ohio," McKeon said, referring to Cpl. Donald Mickler. "They shouldn't have had to deal with that."