CAIRO — An Egyptian court acquitted 41 American, European and Egyptian employees of groups that promoted democracy and media freedom on Thursday, bringing an end to a seven-year case that was a thorn in relations with the United States and had become emblematic of the official backlash against civil society following the Arab Spring protests of 2011.

The defendants were convicted in 2013 on administrative charges relating to financing and official permits that nonetheless carried a criminal penalty. Some received sentences of five years, angering the government in Washington and becoming a source of tension with both the Obama and Trump administrations. Among the groups affected were the National Democratic Institute, the International Republican Institute and the Konrad Adenauer Foundation, a German organization.

Many of those convicted were sentenced in absentia after fleeing Egypt. None served any jail time. But the case underscored official Egyptian sensitivity, and what many viewed as paranoia, about the role of foreign organizations at a delicate moment following the upheaval of the Arab Spring.