CARACAS/SAN CRISTOBAL, Venezuela (Reuters) - Arrests for rebellion and desertion are rising sharply in Venezuela’s armed forces, a mainstay of President Nicolas Maduro’s Socialist government, amid discontent within the ranks at food shortages and dwindling salaries, according to documents and interviews with army personnel.

Internal military documents reviewed by Reuters showed that the number of soldiers detained for treason, rebellion and desertion rose to 172 in the first four months of the year, up three-and-a-half times on the same period of 2017.

Former military officials said the figures reflected a dramatic increase in the level of dissent within Venezuela’s once-proud armed forces. In the whole of 2017, a total of 196 soldiers were arrested on similar charges, according to the same documents.

As Venezuela prepares to vote on Sunday in presidential elections, which the opposition says have been rigged to consolidate Maduro’s grip on power, the role of the security forces will be under scrutiny.

More than 300,000 soldiers and police will stand watch at polling stations. But behind what will likely be impassive faces some soldiers are planning how to flee the country or fretting about how to feed their families on a minimum salary of just $2 a day, according to interviews with serving and former soldiers.

“It’s so demoralizing to open the fridge and see it empty of meat, fish, chicken, ham, cheese and other basics,” said a 42-year-old National Guard sergeant major with more than 20 years of service, asking for his name not to be used.

“When I joined, I used to buy furniture for the house and clothes for the family with my Christmas bonus. Now it gets me three cartons of eggs and two kilos of sugar,” he said in the border city of San Cristobal.

The Defense Ministry and government did not respond to a request for comment. They say military dissent is isolated among a few individuals rather than being a systemic problem.

FIRST LINE OF DEFENSE

During months of opposition protests last year, National Guard members were Maduro’s first line of defense against protesters, firing tear gas and rubber bullets as rocks and Molotov cocktails were hurled toward them. At least 125 people, including some soldiers and police, were killed.

But privately, some acknowledged even then being exhausted, impoverished, hungry and even sympathetic towards demonstrators.

Slideshow ( 6 images )

As Venezuela’s economic crisis has dramatically worsened - with annual inflation hitting nearly 14,000 percent according to the opposition-controlled National Assembly - soldiers and police have joined the hundreds of thousands of Venezuelans pouring into neighboring South American countries.

Gerson Medina, a 36-year-old policeman from the border state of Tachira, said he left for Peru last year after political differences with his superiors.

“Sadly, security forces will continue to leave for Latin America and Europe because these elections are trying to demonstrate a false democracy in Venezuela,” he said in a phone interview.

Maduro’s government has said the elections are transparent and has accused the opposition of not participating solely because it knows it will lose.

While there is no firm data on departures from Venezuela’s 120,000-strong armed forces, interviews with serving and former soldiers, as well as internal military documents indicate hundreds if not more have left in the last year.

Since former soldier Hugo Chavez swept to power in an election in 1998 amid popular anger with Venezuela’s ruling elite, the military has played a leading role in the two-decade-old Socialist Revolution.

Under his successor Maduro, senior military officers have assumed prominent and lucrative roles running several ministries as well as state oil company PDVSA and a state food distribution program.

In public, the military top brass is standing by Maduro and ignoring appeals from the opposition to intervene to prevent what they say is a consolidation of dictatorship.

However, Maduro’s government refers frequently to foiled coup plots against it and it has quelled some small but high-profile rebellions within the security forces.

Last year, rogue police officer Oscar Perez hijacked a helicopter and fired at government buildings in what he said was an action against a dictator. Perez was hunted down and killed by Venezuelan forces in January.

Slideshow ( 6 images )

A National Guard captain, Juan Carlos Caguaripano, early last year attacked a military base with a group of current and former military officials. He was captured soon after.

“The same thing is happening in the barracks as is happening in the slums: people are going hungry; they are suffering an overwhelming crisis,” said Henri Falcon, a former soldier who has bucked the broad opposition boycott and is Maduro’s primary opponent in the election.

Maduro, expected to win on Sunday, has said that he is the victim of an “armed insurrection” by U.S.-backed opponents seeking to gain control of the OPEC country’s oil wealth.

MILITARY OUSTER

In August, U.S. President Donald Trump threatened military intervention in Venezuela - a move that would likely prove unpopular with neighboring governments in a region wary of American intervention.

However, in February, then-U.S. Secretary of State Rex Tillerson suggested the Venezuelan military might decide to oust Maduro.

“Whether he meant to or not, Tillerson was signaling U.S. pre-acceptance of a military coup to remove Maduro,” said a former senior CIA official speaking on condition of anonymity.

“Some of the biggest ‘U.S.-supported’ actions were not done by people we hired and trained for the task. They were done by fence-sitters who, once they saw we would approve, made their move,” the official said.

Some investors in recent weeks have even bought Venezuela’s defaulted debt on speculation that Maduro’s reelection could prompt the military to intervene to prevent economic collapse.

Venezuela is no stranger to military coups.

Then-paratrooper Chavez attempted to seize power militarily in 1992 though failed. It was soon after that attempt that he and Maduro became close.

A decade later, as president, Chavez was himself ousted from power for a couple of days by military officers and business leaders.

Herbert Garcia, a former senior army general and government minister who split with Maduro and now lives in the United States, said a successful uprising did not look imminent.

“In order for a military coup to succeed, political coordination with a strong, credible and united opposition must exist. It doesn’t,” he told Reuters, referring to the country’s fragmented political opposition.

Meanwhile, some soldiers in Venezuela admit their unhappiness but want to stick around in the military.

“We cannot be happy with this situation, I love my country and I’m not leaving,” said one National Guard soldier, with more than a decade of service, standing at a command post in Tachira. “I’ll be here to turn off the light when everyone has gone.”

See graphics on upcoming elections in Latin America here and in Venezuela here.