An appeals court in Niger has found an exiled opposition leader guilty of baby smuggling and sentenced him to one year in prison.

Hama Amadou, who was the main challenger to President Mahamadou Issoufou in last year's presidential election, has been living in France and was tried in absentia.

Lawyers for Amadou walked out of the court in Niamey Monday before the verdict was read, saying the goal of the proceedings was to prevent Amadou from running for office again. They have long maintained the charges against Amadou are politically motivated.

Amadou is one of a group of people, including his wife, accused of smuggling babies from neighboring Nigeria, via Benin, to wealthy couples in Niger.

The allegations against Amadou first surfaced in 2014 when he was parliamentary president. Shortly afterwards, Amadou's parliament immunity was suspended and he fled to France.

The case against Amadou has taken several turns, initially being dropped by a Niger court in 2015, only to be reinstated by an appeals court later in the year.

While living in France, Amadou announced he would run against President Issoufou in upcoming elections. When he returned to Niger in 2015, he was promptly arrested, but was allowed to run for president and manage his campaign from his prison cell.

FILE - Niger's President Mahamadou Issoufou arrives for the inauguration of the new Nigerian President, Muhammadu Buhari, in Abuja , Nigeria, May 29, 2015.

In the first round of voting, Amadou took 18 percent of the vote against Issoufou's 48 percent. Issoufou went on to win with 92 percent of the run-off ballot in March, 2016, with the opposition boycotting the election.

Amadou was released on medical grounds several days before the second round of presidential voting, and again flew to France.