(CNN) -- An Argentine court has sentenced former President Carlos Menem to seven years in prison for his role in illegally smuggling weapons to Ecuador and Croatia.
An appeals court found Menem guilty of aggravated smuggling earlier this year.
Menem, 82, is serving as a senator and has immunity from going to prison, but lawmakers could vote to strip him of that protection.
On Thursday, the court also sentenced former Argentine Defense Minister Oscar Camilion to 5½ years in prison.
Menem was Argentina's president from 1989 to 1999. He has maintained his innocence.
The case against him and other government officials began in October 2008. Hundreds of witnesses testified, according to judicial officials.
In 2011, a court absolved him of charges that he violated international weapons embargoes, but prosecutors won an appeal earlier this year.
Prosecutors alleged that Menem authorized the illegal sales of weapons to Ecuador and Croatia between 1991 and 1995.
Both Ecuador and Croatia were involved in armed conflicts at the time, and prosecutors said the weapons sales violated United Nations and Organization of American States embargoes.
In 2011, Menem told judges at a Buenos Aires court that his actions as president were "limited to signing decrees exporting weapons to Venezuela and Panama."
"From there, all the proceedings that were carried out were out of control of the president," he said.
Journalist Ivan Perez Sarmenti contributed to this report from Buenos Aires.