Venezuelan troops will parade past Nicolas Maduro after he is sworn into office Friday, but keeping their loyalty will be tricky for a leader lacking the charisma and savvy of his predecessor.
Since Hugo Chavez's March 5 death, Maduro has staged frequent public events with top military leaders, showing off "civic-military unity" of the leftist regime he inherited from "el comandante."
"We have a Chavista armed forces, which is to say patriotic, Bolivarian, revolutionary, anti-imperialist," Maduro said Tuesday.
But cracks also have appeared on the facade of unity.
Maduro revealed in the same remarks that "a small group of military officers is under investigation" for contacts with the opposition, which he accused of attempting to stage a coup d'etat in refusing to recognize his victory in Sunday's snap elections.
The government has provided no other details, but according to two experts who follow the military from outside government, 11 military officers were detained, two of them of high rank.
One of the experts, Rocio San Miguel, heads a non-governmental group called Control Ciudadano, or Citizen Control, that presses for transparency on military matters, and the other, retired general Antonio Rivero, is a former director of the civil protection agency.
"The armed forces reflect the country, and Venezuelan society," said Hernan Castillo, an expert on civil-military relations at the Universidad Simon Bolivar, of the signs of unease within the military.
There is discontent within the officer corps because "promotions are not based on military and professional merits but on political qualifications," he said.
-- A black box --
Maduro, 50, comes to the presidency as a onetime bus driver and union organizer who rose through the political ranks under Chavez to become foreign minister and vice president.
He never served in the military, however -- unlike Chavez, a retired lieutenant colonel who gave military officers important political responsibilities during his 14 years in power, and cast the military in the ideological mold of his socialist revolution.
Chavez, who joined the military as a 17-year-old cadet and led a failed coup in 1992, became obsessed with the armed forces' loyalty after he was overthrown for 48 hours in an ultimately unsuccessful 2002 coup.
He purged 1,500 officers from the military in 2004, restructured the high command, raised pay for the troops and pushed through institutional reforms that tied the military to his Bolivarian revolution.
The 130,000 to 140,000-strong National Bolivarian Armed Forces of Venezuela adopted the slogan: "Fatherland, Socialism or Death, We will Overcome!" The military soon became one more "Chavista" institution.
"The armed forces are a black box for Maduro. He has to struggle with the military stamp left on government by Hugo Chavez. The challenge is to put it back on an institutional track," said San Miguel.
Analysts say the struggle within the armed forces is between those who want to turn it into the armed wing of the ruling United Socialist Party of Venezuela and those who want the military to stay within its institutional lanes.
Rivero said there were factions within the military "contrary to the regime and in particular contrary to the Cuban involvement," just as there are others who are aligned with the government's social and political bent.
According to Rivero, more than 300 Cuban military personnel are in Venezuela, influencing defense policy and the organization of the armed forces in areas like training and intelligence.
Chavez acknowledged the Cuban military presence in the Venezuelan army in 2010 for the first time. "The Cubans are helping us. They have told us how to store compasses, how to repair radios in tanks and how to store munitions," he said.
Venezuela spent $16 billion on military equipment between 2005 and 2012, but its power goes far beyond mere military matters, according to Control Ciudadano.
Of Venezuela's 23 state governors, 11 are retired Chavista military officers, and a quarter of cabinet members are active duty military officers, said San Miguel, who noted that military officers also are in key positions in state-owned companies and institutions.
One of the country's most powerful men is National Assembly Speaker Diosdado Cabello, a former military officer who took part in the 1992 military uprising that Chavez led.
Another sign of the militarization of Venezuelan society are the militias, whose 130,000 men and women support the military, described by the government as "the people under arms" and by critics as a "pretorian guard."
The military politicization was on display a day after Chavez's death, when the defense minister, Admiral Diego Molero, vowed in televised comments that the armed forces would not fail the late president. He then publicly called on Venezuelans to fulfill Chavez's wishes by voting for Maduro.
And Major General Wilmer Barrientos, the head of the armed forces' Operational Strategic Command, warned: "Those who think we are beginning an era without Chavez are mistaken. Chavez still lives, in the heart of the people."