An Egyptian court on Tuesday convicted 43 nonprofit workers, including at least 16 Americans, of illegally using foreign funds to foment unrest in the country, sentencing them to up to five years in jail.

Most of the Americans had left the country. They include Sam LaHood, son of the U.S. Transportation Secretary Ray LaHood. He received a five-year jail term.

Present at Tuesday's hearing was American Robert Becker, who received a two-year sentence. Becker has maintained that his refusal to flee Egypt with fellow Americans who were in the country at the time of the crackdown on nonprofit groups was to show solidarity with his Egyptian colleagues.

The verdict read out by judge Makram Awad also ordered the closure and seizure of the offices and assets in Egypt belonging to U.S. nonprofit groups as well as one German organization for which the defendants worked. These are the International Republican Institute, the National Democratic Institute, Freedom House, a center for training journalists and Germany's Konrad Adenauer Foundation.

Of the 43 defendants, 27 received five-year jail terms. Another five received two years and 11 got one year. Defendants tried in absentia typically are convicted and receive the maximum sentence but also get an automatic retrial. All 43 were fined 1,000 Egyptian pounds ($143).

Beside the Americans, eight other foreigners of Serbian, Jordanian, Lebanese, and other nationalities were tried.

The trial began in early 2012 during the nearly 17 months of military rule that followed the ouster in the previous year of U.S. ally Hosni Mubarak. The case led to a period of tension in U.S.-Egyptian relations, with Washington warning that, unless resolved, it could lead to the loss of American aid.

There was no immediate comment from the Obama administration on the verdicts, but a senior U.S. congressman, Chairman of the House Foreign Affairs Committee Ed Royce, condemned the ruling in a statement and urged Islamist President Mohammed Morsi to allow nonprofit groups to work toward a democratic Egypt.

"This is another assault on Egyptian civil society. As if these trials were not bad enough, the Egyptian government is pushing a new law targeting NGOs (non-governmental organizations) that will further suffocate civil society," said Royce, a Republican from California. "President Morsi should immediately reverse course and allow for Egyptian domestic and international NGOs to work toward a democratic and secure Egypt."

In Berlin, the German foreign minister said his country was outraged by the verdicts and will work for their overturn.

"The actions of the Egyptian judiciary are troubling. They weaken civil society, which is an important pillar of democracy in the new democratic Egypt," the minister, Guido Westerwelle, said in a statement. "The German political foundations are doing wonderful work in Egypt. They are doing exemplary work during a historical phase for Egypt, laying the foundations for democracy, rule of law, pluralism and intercultural dialogue."

The former head of the Konrad Adenauer Foundation received a five-year sentence on Tuesday and an employee was jailed for two.

Egypt and the United States have been close allies for more than three decades, with the Egyptian military receiving more than $1 billion in aid annually. The aid is linked to Egypt's adherence to an American-mediated 1979 peace treaty with Israel, Washington's closest Middle East ally. Besides the $1.3 billion in U.S. military aid, Egypt also receives about $250 million in economic aid every year.

Mubarak, the military rulers who followed him, and now Morsi's government have all been at odds with nonprofits over both their activities and their funding. Last week, the New York-based Human Rights Watch and 40 Egyptian rights groups said an Egyptian draft law regulating non-governmental organizations would restrict the funding and operation of independent groups.

The contentious bill, proposed by Morsi and shortly to be debated by the country's interim legislature, would allow the state to control nonprofits' activities as well as their domestic and international funding, HRW said. The current form of the bill is a serious regression from earlier versions, it added.

In a joint statement, the 40 Egyptian rights groups accused Morsi's Muslim Brotherhood and its political arm of seeking to curb the freedom of rights groups through legal restrictions. They said the proposed law potentially gives Egypt's security apparatus the power to suppress rights group, drawing parallels to Egypt's recent past under Mubarak's 29-year rule

They also expressed fears foreign nonprofits would be treated with hostility and that vaguely worded legislation would hinder operations or the issuance of work permits.

A spokesperson for Catherine Ashton, the EU's foreign affairs chief, said Morsi's bill contained elements that would constrain the work of nonprofit groups and hinder the European Union's own capacity as a foreign donor to support their work.

"The draft law has to be in line with international standards and obligations of Egypt," the spokesperson said in a statement issued Sunday.

Nonprofit pro-democracy groups have trained thousands of young Egyptians in political activism and organizing, an education that played a key part in the success of the 2011 uprising that toppled Mubarak.

The crackdown against the nonprofit groups began in late December 2011, when Egyptian security raided offices of 10 pro-democracy and human rights groups. Workers, including the 16 Americans, were then charged with using illegal funds and promoting protests against the then-ruling military.

The groups hotly denied the charges. They insisted their financing is transparent, and all their efforts to register had been stalled by the Egyptian government.

During the trial, the prosecution maintained that, between them, the four U.S. groups and one German organization illegally received about $50 million in funds, most of that in the months that followed Mubarak's ouster in February 2011. It claimed that the groups were engaged in illegal polling, training in political activism and other activity without the knowledge or the approval of authorities.

Their activity, prosecutor Abdullah Yassin told the court last year, amounted to an "infringement of the sovereignty of the state of Egypt.