The sentences follow raids in 2011 on the offices of foreign non-governmental organisations (NGO). When former president Hosni Mubarak was ousted, new authorities accused the groups of receiving foreign funds illicitly and working without a licence.
Former director of the Egyptian branch of the Konrad Adenauer foundation, Andreas Jacobs was sentenced to five years in jail, while his colleague received a two-year sentence.Both said they will appeal the ruling.
The court also ordered the permanent closure of the branches of the NGOs where the staff worked.
As well as the Konrad Adenauer foundation, prison terms were also imposed on employees of US-based NGOs Freedom House, the International Republican Institute and the National Democratic Institute.
"We are outraged and deeply concerned over the stiff judgements against staff of the Konrad Adenauer Foundation in Cairo and the ordered closure of the office," said German Foreign Minister Guido Westerwelle in a written statement.
"The action by the Egyptian justice is alarming. It weakens civil society as an important pillar of democracy in a new democratic Egypt," he said.
The verdict comes as Egypt debates a new law regulating NGOs that has been fiercely criticized by civil society groups.
"Today's Egypt NGO verdict – an unjust verdict based on an unjust law, and the new draft NGO law would not produce a different outcome," said Sarah Leah Whitson, executive director for the Middle East and North African Division of Human Rights Watch.
President Mohamed Morsi, who referred the bill to the Islamist-dominated senate last week, pledged that he "does not aspire to control civil society," in a departure from Mubarak's strongman tactics.
He has insisted that he must reform a corrupt inherited bureaucracy and instil transparency.
His aides say that the NGO bill was drafted in that spirit. But many NGOs, already wary of the Islamist president, say it is an attempt to assert control over the foreign funding of projects such as human rights advocacy.
EU Foreign Policy chief Catherine Ashton said she "fears that the draft law still contains elements that can unnecessarily constrain the work of NGOs in Egypt and hinder our capacity as a foreign donor to support their work."
"The draft law has to be in line with international standards and obligations of Egypt," she said.