L to R: Al-Jazeera English producer Baher Mohamed, Canadian-Egyptian acting Cairo bureau chief Mohamed Fahmy, and Australian correspondent Peter Greste during their trial on terror charges in Cairo, Egypt.

Egypt's judiciary has dealt a shocking blow to the principle of free speech after three journalists for Al-Jazeera English were sentenced to between seven and 10 years in jail on charges of aiding terrorists and endangering national security.

The former BBC correspondent Peter Greste, from Australia, the ex-CNN journalist Mohamed Fahmy, and local producer Baher Mohamed were jailed for seven, seven and 10 years respectively. Four students and activists indicted in the case were sentenced to seven years.

The judge also handed 10-year sentences to British journalists Sue Turton and Dominic Kane and the Dutch journalist Rena Netjes, who were not in Egypt but being tried in absentia.

The courtroom packed with journalists, diplomats and relatives erupted at the verdict which came despite what independent observers said was a complete lack of evidence.

Shouting from the defendants' cage as he was led away, Fahmy, a Canadian-Egyptian citizen, said: "They'll pay for this". Greste's reaction could not be heard, but the faces of his two younger brothers – both present in court – were grim.

"I'm just stunned," said Andrew Greste, as reporters were pushed from the courtroom. "It's difficult to comprehend how they can have reached this decision."

Fahmy's mother and fiancée both broke down in tears, while his brother Adel, who travelled from his home in Kuwait for the verdict, reacted with fury.

"This is not a system," he said. "This is not a country. They've ruined our lives. It shows everything that's wrong with the system: it's corrupt. This country is corrupt through and through."

Diplomats and rights campaigners who have observed the trial expressed incredulity at the verdict.

"On the basis of the evidence that we've seen, we can't understand the verdict," said Larry King, the Australian ambassador in Cairo. "We will make our feelings clear to the Egyptian government and we will continue to provide all possible consular assistance."

Evidence provided by the prosecution included footage from channels and events with nothing to do with Egyptian politics or al-Jazeera. It included videos of trotting horses from Sky News Arabia, a song by the Australian singer Gotye, and a BBC documentary from Somalia.

Mohamed Lotfy, executive director of the Egyptian Commission for Rights and Freedoms who has observed every session of the trial for Amnesty, said the verdict sent a chilling message to all opposition figures in Egypt.

"It's a warning to all journalists that they could one day face a similar trial and conviction simply for carrying out their official duties," Lotfy said. "This feeds into a wider picture of a politicised judiciary and the use of trials to crack down on all opposition voices."

The verdict came a day after the US secretary of state, John Kerry, signalled that ties between America and Egypt were inching closer to normality.

After a 90-minute meeting with Abdel Fatah al-Sisi, the former general who was elected president last month, Kerry told reporters that a delivery of attack helicopters – delayed by the US last year, in protest against Egyptian human rights abuses – would go ahead.

"The Apaches will come, and they'll come very, very soon," Kerry's said, after an earlier admission by state department officials that all but $70m (£41m) of a $650m aid package to Egypt had been released.

Kerry told reporters he had emphasised to Sisi that the government must uphold "the universal rights and freedoms of all Egyptians".

"We also discussed the essential role of a vibrant civil society, free press, rule of law and due process in a democracy," he said.

The British ambassador, James Watt, said he was disappointed with the verdict: "Freedom of expression is fundamental to any democracy".

Australia's foreign minister, Julie Bishop, said her government was shocked and appalled by the verdict. "The Australian government simply cannot understand it based on the evidence that was presented in the case," she said.

It remains unclear what recourse the defendants will now take. Shouting as he left court, Fahmy said he would not seek an appeal – perhaps hopeful of an intervention from Egypt's new president, the former general Abdel Fatah al-Sisi. But Greste's youngest brother, Mike, later said an appeal was the only legal recourse left to his family.