And the defense minister, Vladimir Padrino López, an army general, has been granted an even more lucrative arrangement, with expanded powers to control the country’s ports, as well as parts of the oil and mining industries.

“Maduro has made sure to give many rewards to senior military officers in exchange for loyalty,” said John Polga-Hecimovich, a political scientist who studies Venezuela at the United States Naval Academy. “While he is completely dependent on them to stay in power, they have much to lose if he is gone.”

Mr. Maduro’s crackdown against the street protests is drawing widespread condemnation. On Tuesday, the United Nations said that the government had used excessive force against demonstrators and that security forces and pro-government armed groups had caused more than half of the 124 deaths that have accompanied this year’s protests. Eight members of security forces had been killed, the United Nations said.

Mr. Polga-Hecimovich pointed to what he called the “four P’s” — purges, promotions, politics and profit — that have kept many military leaders loyal to the government. The purges and promotions date back to President Hugo Chávez, who picked Mr. Maduro to be his successor before he died in 2013.

Mr. Chávez participated in an unsuccessful uprising against the government when he was an army lieutenant in 1992. A decade later, he was also the victim of a coup attempt as president.

After regaining control, Mr. Chávez embarked on a major effort to rid the military of anyone who might challenge him again. He also instituted a new brand of military education to indoctrinate the armed forces to his Socialist-inspired movement, even requiring soldiers to attend rallies. Promotions became based less on performance and more on leftist leanings, former soldiers say.