BAGHDAD, Iraq (CNN) -- U.S. Defense Secretary Robert Gates, who arrived in Iraq in a surprise visit Saturday, said he doubts U.S. troop presence in Afghanistan will reach the levels attained in Iraq.

U.S. Defense Secretary Robert Gates speaks to U.S. troops at Joint Base Balad in Iraq on Saturday.

The Soviets, who invaded Afghanistan in the 1970s but left in early 1989 after failing to control the country, had 120,000 troops but lost because they didn't have the support of the people, Gates told troops at Balad Air Base, just north of Baghdad.

The U.S. military has about 31,000 troops in Afghanistan, less than a quarter of its total strength in Iraq.

Gates' predecessor, Donald Rumsfeld, made similar comments in a 2005 Senate hearing about the Soviet presence in Afghanistan. At the time, Rumsfeld was dealing with a conflict of a different nature, but the comments arose while he was defending what critics called insufficient U.S. troop strength in Iraq.

On Thursday, Gates was in Afghanistan, where he was met by Gen. David McKiernan, the commander of U.S. and NATO forces battling a resurgent Taliban and its al Qaeda allies.

Gates said that the U.S. military plans to move three more combat brigades to Afghanistan by summer.

The deployment will include one brigade that was scheduled to be sent to the seven-year conflict in January and two more that have yet to be named.

Don't Miss

McKiernan has requested four additional brigades, including the one scheduled for January deployment, between 14,000 and 20,000 troops.

In September, Gates said that the Pentagon would be unable to commit new troops before spring or summer, partly because of its larger commitment to the Iraq war.

Gates said before he arrived in Kandahar that the ideal size of the U.S. military presence in Afghanistan is still being debated and that Americans needed to be "more sensitive" toward Afghan concerns about international troops on their soil.

Speaking to U.S. forces in Balad, Iraq, on Saturday, Gates said the goal in Afghanistan is to expand training for its national army and police so the country can become self-sufficient.

"Despite what you might hear about an increased focus in Afghanistan, let there be no doubt that your mission and the mission of all American troops in Iraq remains incredibly important during this crucial transition period," he told the troops.

Terrorists, he said, are always looking to reverse the gains made in Iraq in the past year and a half.

In the future, he said, he would like to see the United States provide struggling nations with developmental assistance and help them build the institutions that will prevent them from becoming "failed states."