(CNN) -- Gen. David Petraeus took charge Friday of U.S. Central Command, the American military headquarters that focuses on a region of the world that includes Iraq, Afghanistan and Pakistan.
"There can be no higher privilege for any soldier than being allowed to serve once more with such wonderful Americans and to work hard at work worth doing," Petraeus said at the ceremony at MacDill Air Force Base in Tampa, Florida.
Petraeus took the helm from Lt. Gen. Martin Dempsey, who had led Central Command since Adm. William Fallon's resignation in March.
U.S. Defense Secretary Robert Gates, who presided over Friday's ceremony, praised both Demsey and Petraeus.
"These past few months, Marty has more than held down the fort at CentCom," Gates said of Demsey.
"He has responded at every turn, with a quiet confidence that earned my admiration and that of countless others under his command and throughout the region."
Dempsey now will serve as the four-star commander of the Army's Training and Doctrine Command, Gates said.
Of Petraeus, Gates said, "He is precisely the man we need at this command at this time."
As commander of Central Command, Petraeus will oversee U.S. military objectives and activities in a broad swath of the Middle East and Central and South Asia. The region extends from Egypt to Pakistan and covers countries as far north as Kazakhstan and as far south as Yemen.
"CentCom's tasks are of enormous importance to our country, to the CentCom region and to the world," Petraeus said.
"It's clear that in the months and years ahead a great deal of responsibility will continue to rest on the shoulders of the wonderful men and women of the coalition countries serving in harm's way, in the Central Command area of responsibility, and it is an honor to serve with them again."
Petraeus takes control of Central Command amid planned reductions in U.S. troop levels in Iraq and a rise in Taliban attacks on coalition troops and government targets in Afghanistan. The United States has pressured its NATO allies repeatedly to send more troops to Afghanistan.
In addition, suspected U.S. military strikes against militants across the Afghan border, inside Pakistan, have sparked outrage among a new national government there.
Two such suspected missile strikes killed 28 people Friday in northwest Pakistan, military sources and local and intelligence officials said.
On Wednesday, Pakistan's Ministry of Foreign Affairs summoned the U.S. ambassador, Anne Patterson, to lodge a complaint about missile attacks it believes have been conducted on Pakistani soil by unmanned U.S. drones. The ministry told Patterson that such attacks violate Pakistan's sovereignty and should be stopped immediately.
Last week, Pakistan's parliament passed a resolution that condemned any incursion on Pakistani soil by foreign forces.
Petraeus took over as commander of U.S. forces in Iraq in February 2007, with the difficult task of stopping the bloodshed in Iraq.
Violence appeared to be out of control that month: Six U.S. helicopters were shot down, deadly bombings were common and nearly 500 bodies turned up in the capital -- many of the victims killed execution-style.
Then came the "surge" -- the temporary influx of 31,000 U.S. troops. That action is one of several factors credited with reducing violence across Iraq. Watch a province return to Iraqi control »
Other factors include the decision by radical Shiite cleric Muqtada al-Sadr to order his followers to lay down their arms and the move by many Sunni insurgents to switch sides and fight on the U.S. side -- for pay. Author Bob Woodward also has credited a top-secret program the U.S. military has used to kill suspected terrorists.
"I think that Gen. Petraeus will be regarded by history, by military historians, as a great American military strategist," said Martin Navias, defense analyst for the Center of Strategic Studies at Kings College in London.
"When he came into power ... the situation in Iraq was terrible."
Petraeus told CNN recently that the future of Iraq remains uncertain.
"There are many of these possible storm clouds that are out there," he said.