The United States should not make a hasty withdrawal from Afghanistan as it did in Iraq, and instead should keep current troop levels through 2017, a newly elected influential Republican senator said Thursday.

In a speech at the U.S. Institute of Peace, Sen. Tom Cotton of Arkansas said the U.S. is safer because of the military effort in Afghanistan, which he called “the heart of U.S. national security strategy.”

“We should not make the mistakes of Iraq in Afghanistan. … We should commit 10,000 troops there through 2017,” Cotton said.

Cotton, a former U.S. representative from his state, is a military veteran who served in both Iraq and Afghanistan.

The Thursday event was sponsored by the Alliance in Support of the Afghan People, a group of prominent Afghans and Americans that advocates continued U.S. engagement in Afghanistan.

President Barack Obama announced last May that about 9,800 U.S. troops would remain in Afghanistan after the U.S.-led combat mission ended in 2014. The plan called for the number of troops to be cut in half by the end of 2015, and reduced to only a normal embassy presence — similar to that left in Iraq, from which Obama withdrew troops in 2011.

The U.S. announced last month that it would keep an extra 1,000 troops in Afghanistan for the first few months of 2015 because of planning delays caused by the Afghan government’s late signing of a bilateral security agreement with Washington.

The U.S. drawdown plan has drawn criticism from some members of Congress. Prominent Republicans have suggested that a hasty departure would leave Afghanistan vulnerable to the kind of chaos that ensued in Iraq following the American military withdrawal in 2011.

However, Ashton Carter, Obama’s nominee for secretary of defense, said Wednesday that he would consider changing the current plans for withdrawing all U.S. troops if the security situation worsened in the country.

Echoing the Republican criticism, Cotton said, “One need only look west to Iraq. Against the best military judgment of his commanders, President Obama withdrew all troops from Iraq in 2011.”

He warned that “while the Afghan National Security Forces have made real gains, they’re not in a place where we can be assured of their long-term stability and success.”

Cotton asserted that the Haqqani Network on the Afghanistan-Pakistan border remained a threat to Afghanistan, and that it remained one of the most virulent insurgencies in Afghanistan.