HARARE, Zimbabwe — Zimbabwe’s top military commander waded into an escalating feud within the country’s governing party on Monday, issuing a rare warning to President Robert G. Mugabe.

“When it comes to matters of protecting our revolution, the military will not hesitate to step in,” the commander, Gen. Constantine Chiwenga, who leads the Zimbabwe Defense Forces, said in what amounts to an extraordinary intervention in the country’s politics.

General Chiwenga was referring to the armed struggle that contributed to the independence of Zimbabwe in 1980 from Britain, following a period of white minority rule.

Although not a military commander himself, Mr. Mugabe, 93, was a leader in that struggle. Lately, however, the political party he helped found, ZANU-PF, has purged several veterans of the struggle, including Vice President Emmerson Mnangagwa, whom Mr. Mugabe abruptly fired last week in a move that was widely seen as clearing the path for Mr. Mugabe’s wife, Grace, as a possible successor. (Mrs. Mugabe, 52, was a teenage student during the struggle.)