Abdellah Sriti, the correspondent of the Lebanese Hezbollah's TV station Al Manar, and Alaa Badella Maa El Ainin, a member of the Justice and Development party, the main Islamic party in Morocco were given 20 years in prisons.
The court sentenced other defendants to prison terms ranging from one to 10 years. They included a university professor, a telecoms engineer, a hotel manager in the tourist city of Marrakesh and a police officer.
Moroccan authorities arrested a total of 35 people in January and February for belonging to the network, known as the Belliraj cell.
The government said the Belliraj gang posed an unusually potent threat because they had planned to infiltrate state institutions, politics and civil society.
Morocco says the group was planning to carry out terrorist acts with explosives and fireams, assassinate high-ranking civil and military officials as well as Moroccan citizens of Jewish confession.