CAIRO - An Egyptian court on Wednesday convicted 26 men of spying for the Lebanese militant group Hezbollah and plotting attacks in Egypt, and gave them prison sentences ranging from six months to life.

Three of the defendants, including the group's Lebanese leader, Mohammad Qiblan, were convicted in abstenia and received life sentences. The rest of the group -- including Egyptians, a Sudanese, West Bank Palestinians and Lebanese nationals -- was handed sentences ranging from six months and 15 years.

The verdict cannot be appealed.

The group was charged with planning attacks on tourists and shipping in the Suez Canal, and sending operatives and explosives to Gaza to aid militants there.

The courtroom erupted with cries of shock at the sentences and chanting when Judge Adel Abdelsalam Gomaa pronounced the verdicts at Cairo's emergency court.

The trial, which started in August 2009, is the first time Egypt has prosecuted alleged Hezbollah activists. In April of that year, Egyptian security officials said they had uncovered a Hezbollah cell plotting to destabilize the country.

Hezbollah leader Hassan Nasrallah has admitted to sending an agent to supervise weapons shipments to Hamas in Gaza, but he has denied seeking to undermine Egypt's security.

Hezbollah declined to comment on the verdict.

But in a statement aired on the group's Al-Manar television, Emile Rahme, the Lebanese lawyer for one of the defendants, Sami Chehab, denounced the verdict as a "political" ruling from Egypt's courts and criticized the sentences as "harsh and unjust."

Chehab was sentenced to 15 years in prison.

At least three of the suspects were also charged with digging tunnels under Egypt's border with Gaza with the intention of smuggling people and goods. Others are charged with providing safehouses for militants smuggled across the border.

This is also the first time Egypt has convicted people involved in the smuggling trade with Gaza.