It did not identify those convicted, but said that one had fought in the ranks of the jihadist Islamic State group and had been wounded in the leg.
Among the other defendants jailed by the court was a minor sentenced given six months for "praising terrorist acts", the agency said.
Other defendants tried in the same case, including for indoctrination, were given jail terms of between two and four years.
In September, the government approved a draft law to tighten anti-terrorist legislation, aimed especially at stopping people from joining jihadist groups.
More than 2,000 Moroccans, including people with dual citizenship, are believed to have signed on with jihadist groups in Syria and Iraq.
-------------------------------------------------------------------------------------------------------------------
Among the other defendants jailed by the court was a minor sentenced given six months for "praising terrorist acts", the agency said.
Other defendants tried in the same case, including for indoctrination, were given jail terms of between two and four years.
In September, the government approved a draft law to tighten anti-terrorist legislation, aimed especially at stopping people from joining jihadist groups.
More than 2,000 Moroccans, including people with dual citizenship, are believed to have signed on with jihadist groups in Syria and Iraq.
-------------------------------------------------------------------------------------------------------------------