Ugandan police officers stand guard outside the house of opposition leader Kizza Besigye on Monday. (Isaac Kasamani/Agence France-Presse via Getty Images)

AFTER THREE decades in power, Uganda’s president, Yoweri Museveni, is acting nervous. On Feb. 18, he won a presidential election with 60.8 percent of the vote; his nearest rival, opposition leader Kizza Besigye, received only 35.4 percent. But Mr. Museveni did not seem reassured. The opposition leader was detained multiple times during the voting and was under house arrest at the time the results were announced. When European monitors pointed to voting irregularities, the president testily fired back, “I don’t need lectures from anybody on how to organize elections.”

The Uganda vote was less violent than in previous elections , when opposition leaders were beaten and arrested. Mr. Besigye was able to campaign, although his supporters were harassed. But Mr. Museveni’s manipulations were extensive. Before the vote, the ruling party overwhelmed the opposition with spending for such things as vehicles and campaign paraphernalia. Mr. Museveni’s party threatened communities, saying if they did not support him, they would lose development aid. And the voting itself was riddled with irregularities. According to the New York Times, many polling stations in Kampala, the capital, did not receive ballots on time, and voting began just hours before the stations were set to close. European monitors noted numerous “shortcomings” in the process, “notably in the areas of neutrality, transparency and the effectiveness of the election administration.” Among other things, the Uganda Communications Commission blocked access to social media on Election Day.

This poor performance brought a reproach from Secretary of State John F. Kerry, who phoned Mr. Museveni “to underscore that Uganda’s progress depends on adherence to democratic principles” and note that harassment of the opposition calls “into question Uganda’s commitment to a transparent and credible election process free from intimidation.” Was Mr. Museveni listening? He ought to be: Uganda is the recipient of $750 million a year in aid from the United States and is an important ally in regional security.

Uganda’s election is, unfortunately, just the latest evidence of backsliding on democracy and governance in East Africa. The most serious deterioration has been in Burundi, beset by violence after President Pierre Nkurunziza decided to run for a third term, triggering protests put down by force, with hundreds of people killed. According to Human Rights Watch, most of Burundi’s independent journalists and human rights defenders have fled the country in the wake of death threats, beatings and possible prosecution on trumped-up charges .

In Ethiopia, elections last year were peaceful but entirely uncompetitive; the government continues widespread repression of free expression, and Ethiopian security forces are continuing to violently suppress largely peaceful protests in the Oromia region that began in November. Political opposition and free speech remain severely constrained in Rwanda, and tensions have been rising in Congo. President Joseph Kabila faces a term limit but may attempt to hang on; he has lately cracked down on those calling for proper and timely elections.

All told, discouraging signs. The United States can and should speak up for democracy, civil society and decent governance in these nations.