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 the British journalists Sue Turton and Dominic Kane and the Dutch journalist Rena Netjes, who were not in Egypt but were 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 Ralph 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.

On Monday Kerry described the court decision as "a deeply disturbing setback to Egypt's transition". Kerry said he had conveyed to Egypt's foreign minister, Sameh Shoukry, that the verdicts "fly in the face of the essential role of civil society, a free press, and the real rule of law".

However in a statement released during his visit to Baghdad, Kerry made not attempt to the temper his warm words for Egyptian president Abdel Fatah al-Sisi, or his support for the renewing military aid to Egypt, which the US had suspended.

The White House strongly condemned the prosecution and called on Egyptian government to immediately pardon hose prosecuted so they could be released. "The prosecution of journalists for reporting information that does not coincide with the government of Egypt's narrative flouts the most basic standards of media freedom and represents a blow to democratic progress in Egypt," said Barack Obama's press spokesman, Josh Earnest.

He said the convictions were "most disturbing" to Washington because they were part of a succession of prosecutions of political activists and summary death sentences that are "fundamentally incompatible with the basic precepts of human rights and democratic governance".

The British ambassador to Egypt, 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 by Sisi. But Greste's youngest brother, Mike, later said an appeal was the only legal recourse left to his family.

Additional reporting by Paul Lewis in Washington