Army Secretary John McHugh is resigning from his post, the Pentagon said Monday.

McHugh told President Obama several weeks ago about his intentions to resign after roughly six years leading the Army. And he will officially depart no later than November 1 to “afford ample opportunity for a smooth transition,” the Defense Department also said.

McHugh, a civilian, became the Army’s 21st secretary in September 2009. He also was a Republican New York congressman from 1993 to 2006.

"Secretary McHugh has been a tremendous public servant for decades, and he has helped lead the Army through a period of challenge and change," Defense Secretary Ash Carter said. "Every soldier is better off because of his hard work and vision, and so is the country."