US Defense Secretary Robert Gates named General James Mattis on Thursday as the new head of US Central Command, or CENTCOM, which has overall control of the wars in Iraq and Afghanistan.

Mattis, whose appointment must be confirmed by the Senate, replaces General David Petraeus, who took over direct command of the faltering Afghan conflict after his predecessor was fired for giving a damaging magazine interview.

"The post General Mattis is taking is a critical one at a critical time," Gates told reporters Thursday in announcing his recommendation to President Barack Obama.

Mattis, said Gates, is one of the US military's "outstanding combat leaders and strategic thinkers" and he praised the four-star Marine general for his insights into modern day warfare, notably "how the armed forces must be shaped and postured for the future."

Petraeus formally took over command of the Afghan war last week after Obama fired his predecessor, General Stanley McChrystal, over an interview to Rolling Stone in which he and his staff made disparaging comments about the vice president and other senior administration figures.

Gates issued a memo last week outlining new media rules to better manage the military's contacts with journalists, and said Thursday he had become "increasingly concerned" the military had become "too lax, disorganized and in some cases flat-out sloppy in the way we engage with the press."

The naming of Mattis was unlikely to skirt the issue, however, with Gates having to immediately defend an on-camera 2005 interview in which the general said: "Actually, it's a lot of fun to fight. You know, it's a hell of a hoot.

"You go into Afghanistan; you've got guys who slap around women for five years because they didn't wear a veil. You know, guys like that ain't got no manhood left anyway, so it's a hell of a lot of fun to shoot them."

Gates dismissed the criticism, however, maintaining that appropriate action was taken at the time and that he thought the "subsequent five years have demonstrated that the lesson was learned."

He added he was confident Mattis would now be able to "speak publicly about the matters for which he is responsible in an entirely appropriate way."

Mattis currently heads the US Joint Forces Command, which plays a valuable support role for the US military and also focuses on transforming future capabilities.

He previously commanded Marine forces in both theaters of war that he now oversees, according to his official biography.

As a brigadier general, Mattis commanded forces in southern Afghanistan in the early stages of the conflict, which began in late 2001 after the September 11 attacks on the United States.

He went on to command Marines during the initial invasion and then anti-insurgency operations in the Iraq war.