An Argentine court sentenced former President Carlos Menem to seven years in prison Thursday for illegally smuggling weapons to Ecuador and Croatia in violation of international embargoes in the 1990s.

But Menem, who is 82 years old, will not go to jail anytime soon because of the immunity he enjoys as an elected member of Congress.

The court said the Senate can vote to remove the immunity but will have to wait until the sentence is final, meaning Menem could remain free indefinitely while the Supreme Court studies any appeal.

It is unclear how senators would vote on immunity, given the many corruption scandals that remain unresolved by Argentina's justice system. While Menem's leadership in the 1990s is frequently criticized by President Cristina Fernandez, he has given her reliable votes on critical issues, and her allies control the Senate.

Given Menem's advanced age he would likely serve the sentence at home in any case, invoking a right that nearly all prisoners over 70 have in Argentina.

The trial judges also sentenced Menem's former defense minister, Oscar Camilion, and 10 others to sentences of four to five years.

An appellate court found Menem guilty in March, overturning his earlier acquittal at trial in 2011. The higher court said that much of the evidence had been mistakenly dismissed and that there was no logical way the weapons could have been smuggled without Menem's direct participation and approval.

Menem, who served two terms as president from 1989 to 1999, acknowledged signing secret decrees to export weapons to Venezuela and Panama, but said he had no idea that the tons of rifles and ammunition made in Argentina would end up in Ecuador and Croatia, which were subject to international embargoes at the time.

The appeals court called his defense "incomprehensible," given voluminous evidence that customs procedures weren't followed amid pressure from the presidency. The court found that Menem's brother-in-law and "man of confidence," Emir Yoma, acted as his intermediary with the government authorities and others involved in the scheme. It said Yoma also collected money from the companies involved.

"The only person with enough power to influence simultaneously, and over all these years, three different government ministries, their various agencies, the Argentine Army and even Congress, was the President of the Nation, Carlos Saul Menem, through Yoma," the appellate court said.

Menem was determined to be a "co-author of the crime of smuggling, aggravated by the fact that it involved military weapons and required the intervention of public officials," the ruling said.

Prosecutors had asked for a sentence of eight years if Menem were convicted. The judges settled on seven years, taking into account the former president's age and conduct as well as the aggravating circumstances.

Based on reporting by The Associated Press.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino