The other four are Azerbaijan's Democratic Party Secretary-General Serdar Jalaloglu; Umid (Hope) party Chairman Iqbal Agazade; Halq (People's) party leader and former Prime Minister Panah Huseynov; and Etimad Asadov, the chair of the Karabakh War Veterans Association.
Hacili and Arifoglu, who is also editor in chief of the "Yeni Musavat" newspaper, received the heaviest sentences. Jalaloglu and Huseynov were sentenced to four-and-a-half years each; Ibrahimli and Agazade to three years; and Asadov to two-and-a-half years.
All of them are convicted of criminal offenses in connection with violent street protests after last year's disputed presidential elections.
Although State Prosecutor Nazir Bayramov had demanded heavier sentences, the defendants' lawyers said they would appeal against the ruling.
Attorney Mirismail Hadi, who has defended Huseynov and Hacili throughout the nearly six month-long trial, told reporters the verdict was a foregone conclusion: "This trial was unfair. As we had said earlier, we didn't expect a fair verdict. Those legal violations that became obvious from the onset of the trial today found their logical conclusion. Once again the court confirmed that the whole case had been falsified [from the very beginning]. All this indicates that the verdict was imposed upon orders from above."
The seven defendants were among hundreds of opposition activists detained in the wake of the violent street protests that took place the day after the presidential election on 15 October 2003.
Claming the vote was rigged in favor of Ilham Aliyev, the son of Azerbaijan's outgoing leader, thousands of opposition activists had taken to the streets of Baku to protest the official outcome. Clashes with law enforcement forces soon erupted, leaving at least one civilian dead and dozens of police officers injured.
Most post-election detainees were released after a few weeks in jail during which they reportedly endured ill treatments. Despite protests from both domestic and foreign rights groups, Azerbaijani authorities had refused to release the seven defendants sentenced today, arguing that they were directly responsible for the upheaval.
Opposition parties in turn deny the charges brought against their imprisoned leaders, accusing the government of provoking the clashes to justify a crackdown on political dissent.
Ever since he succeeded his deceased father, Aliyev has been confronted with domestic and international criticism over alleged press freedom violations and harassment of political opponents.
Aliyev and officials of the Yeni Azerbaycan (New Azerbaijan) ruling party have rejected these critics, saying they lacked objectivity and that firmness was needed to protect Azerbaijan's nascent democracy.
Today's verdict is unlikely to improve relations between the Azerbaijani leader and his critics.
The Baku office of the OSCE welcomed the end of the trial but said it is "deeply concerned" by the severity of the sentences.
Talking to journalists after the hearings ended, independent lawyer Muzaffar Bakhishov harshly criticized the judges -- and through them, the Azerbaijani government -- for the decision:
"I believe the defendants should have been acquitted because nothing in what they did [on 16 October 2003] could have possibly served to justify their indictment. The government should think it over. Criminal proceedings against the judges should be open. Article 295 of Azerbaijan's criminal code envisages such proceedings in cases that involve unfair legal rulings."
Bakhishov, who monitored the whole trial on behalf of the OSCE, said the Vienna-headquarted body would soon make its conclusions public in a report "that will be made available to both the Azerbaijani public and government."
(RFE/RL's Azerbaijani Service correspondent Kabiran Dilaverly contributed to this report from Baku.)