Correspondent Rafik Tagi received a three-year prison sentence, while his editor, Samir Sadagatoglu, received a four-year sentence.
The scene inside the courtroom was chaotic, with Islamists chanting prayers in an attempt to prevent the lawyer representing Tagi and Sadagatoglu from addressing the court.
After the judge had called order, he gave this verdict: "Rafik Tagi, under criminal provision Article 283.1, is found guilty and sentenced to three years of imprisonment. He will spend his jail term in a penal facility."
Tagi's editor, Samir Sadagatoglu, received a four-year sentence in a penal facility.
Speaking to the court after the verdict, Tagi said his constitutional rights had been violated and that he is a prisoner of conscience. He said he had never expected such severe punishment for expressing his views on Islam.
"The protection of the human and civil rights of the citizen is the most important duty of the government," Tagi said. "It looks like the court has a different opinion. Article 18 of the constitution says that religion is separated from state and all the religions are equal under the law. Freedom of speech and freedom of expression has been trampled on here in this court. They are forcing me to turn away from my own beliefs. Dear judge, this is unconstitutional."
The issue has dominated the front pages of Azerbaijani newspapers and divided the country's society for months. There are two competing issues: on the one hand, freedom of expression; on the other, religious sensitivities in a secular country with a majority Muslim population and a growing number of radical Islamic groups.
Outside the courtroom, a journalist covering the trial and an Islamist had a heated discussion.
"I'm a Muslim," the journalist said. "Look, I'm holding a Koran in my hand. I listen to the Prophet."
"You call yourself a good Muslim? You're chewing gum," the Islamist replied. "Don't listen to me -- go and listen to the OSCE."
Islamists demonstrating outside the courtroom (RFE/RL)
Islamic fundamentalists in Azerbaijan have issued death sentences against the two journalists. A leading Iranian cleric, Ayatollah Muhammad Fazel Lankarani, has issued a fatwa, calling for the deaths of the two journalists.
The two men have been in pretrial detention since November 15, 2006. They were arrested after Tagi's article was published in the low-circulation daily "Sanat."
Under Azerbaijani law, pretrial detention can last up to three months, but prosecutors can ask for renewals.
The offending article, titled "Europe And Us," suggested Islamic values were blocking development in Azerbaijan. Tagi has previously written articles critical of the government and the president. International Condemnation
International press watchdogs have condemned the detentions. They say that press freedom is on the decline in Azerbaijan. With a few exceptions, most media is under the control of the state.
The Paris-based media watchdog Reporters Without Borders has said Azerbaijani President Ilham Aliyev is on its list of "predators of press freedom." The watchdog says that Aliyev has targeted pro-opposition papers and that physical attacks on journalists have increased.
The New York-based Committee to Protect Journalists has said the authorities have used the courts against independent media, filed criminal defamation lawsuits, and imprisoned critical journalists.
With today's verdict, Azerbaijan will have five journalists behind bars.