The U.S. military has formally ended its mission in Iraq. At a ceremony in Baghdad, U.S. Defense Secretary Leon Panetta watched as American troops lowered their command’s flag, marking an end to the nearly nine-year war that drove out Iraqi ruler Saddam Hussein.

It was a solemn, low-key ceremony outside a terminal at Baghdad’s airport in a fortified area surrounded by concrete barriers.

U.S. Defense Secretary Leon Panetta flew in briefly for the ceremony, which was held in front of scores of U.S. troops and foreign media. There was a seat reserved for Iraqi Prime Minister Nouri al-Maliki. But he did not attend.