The U.S. commander overseeing troops in Iraq and Afghanistan says that the military is on pace to shift away from a combat mission in Iraq but that casualties will worsen in Afghanistan.

Army Gen. David Petraeus said in a speech at Princeton University that after more than eight years of fighting in Afghanistan, the U.S. finally is getting enough troops, diplomats and organizational structure to be able to keep extremist groups from taking over again there.

He says that while violence is down in Iraq, rising political violence is becoming a threat.

Petraeus was in Princeton to receive the Madison Medal, the highest award given by the graduate school there.

The general received a master's degree from Princeton in 1985 and a Ph.D. in 1987.