An Angolan court sentenced 17 youth activists on Monday to jail terms of between two and eight years following a protracted trial that observers both within the country and in the international community have decried as a farce.

The activists, who include popular rapper Luaty Beirao, were charged with plotting an insurrection against longtime President Jose Eduardo dos Santos.

Beirao, who previously conducted a hunger strike for over a month in protest over what he saw as unfair detention, was given a five-year sentence for "rebellion against the president of the republic, criminal association and falsifying documents."

A second defendant, named as the leader of the group by judge, was handed the longest sentence - eight and a half years - for attempting to stage a coup and being part of a criminal organization.

The group had been in prison since June 2015, when they were detained following a meeting on nonviolent resistance to the government. Speaking last week to DW, Angolan journalist Rafael Marques said that the trial was only taking place because "the Angolan regime urgently needs to find an enemy to distract citizens from society's main problems."

Human Rights Watch researcher for Angola and Mozambique Zenaida Machado vowed that the group would continue to put pressure on Luanda give the men a more transparent trial.

"It is an extremely ridiculous sentence and we do not know what it is based on because, during the months in which we were attending the trial, no proof whatsoever was presented in court to justify such harsh penalties," said Machado.

José Eduardo dos Santos has been President of Angola for 36 years, taking office in 1979, only four years after the nation achieved independence from Portugal in 1975. Dos Santos has repeatedly made vows to step down at the end of a mandate, including the next one in 2018, but has so far failed to do so. In a country where almost 70 percent of the population lives on less than two dollars a day despite rich natural resources, his regime has been continuously plagued with allegations of corruption.