In 1940, Franklin Roosevelt told Americans that, by arming Britain against the Nazis, we’d serve as an “arsenal for democracy.” But during the cold war, the opposite was often true, and apparently still is. According to two recent studies, the United States provides aid and sells weapons far more often to autocratic regimes than to democracies; even China partners with democracies more than America does. This pattern is particularly clear in sub-Saharan Africa. For a brief period after the cold war, America used foreign aid and other measures to pressure many countries to democratize; some, like Ghana, Tanzania and Zambia, now hold more or less credible elections. But today, our strongest military allies there, especially in eastern Africa, do not.

In Ethiopia, which receives nearly $2 billion from Western donors each year, the ruling party and its allies won every parliamentary seat in last May’s election; during the campaign, opposition supporters were beaten and arrested, and opposition groups said the outcome was rigged. Since mid-December, at least 140 peaceful protesters there have been shot dead by security officers. In Burundi, lavish foreign aid emboldened President Pierre Nkurunziza to run for what many say is an unconstitutional third term last July, sparking a coup attempt and bloody street battles. The opposition boycotted the election, and Nkurunziza won easily, but the UN now fears that what started as a crackdown on street protests may escalate into civil war. Some 100,000 refugees have already fled the country. Rwanda’s President Paul Kagame recently announced that he too intends to scrap term limits and run again in 2017, perpetuating a fear-based regime in which numerous dissidents have been jailed and some killed.

Now Uganda, one of our most important African military allies, will hold presidential and parliamentary elections on February 18. Despite strong opposition, this election may be decided outside the voting booth too. In exchange for putting Ugandan troops at America’s disposal, often without parliamentary approval and other niceties required by more democratic countries, Uganda has received some $15 billion in foreign aid from the West since 1990. But since the country gained independence from Britain in 1962, it has never had a peaceful transfer of power; President Yoweri Museveni, in office since taking over in 1986 after years of civil war, has overseen a feast of corruption remarkable even by African standards.

Change is long overdue. Uganda’s child death rate is higher than that of any of its neighbors, except those at war. Only one fifth of students initially enrolled actually take the exams they need to graduate from primary school, according to unpublished research by lawyer Godber Tumushabe. And although the World Bank has long touted the country as an economic success story, 63 percent of the population lives under the Bank’s own poverty threshold of $3.10 a day. The income of most Ugandans is actually in the form of food they grow themselves, a Uganda Bureau of Statistics official told me, but a spate of land-grabbing cases throughout the country threatens even these meager livelihoods.

Dissidents calling attention to these problems have been subject to arbitrary arrest, seizure of property, detention without trial, and mysterious disappearances and deaths that many believe to be politically motivated. In Uganda, such abuses have tended to peak during campaign seasons, and the current one is no different. Thugs wearing ruling party T-shirts have stolen and defaced opposition campaign materials, and police have tear-gassed and fired on opposition supporters, and arrested and allegedly tortured opposition campaign agents. One was recently found decapitated and another has disappeared.

In November, I followed the campaign of leading opposition candidate Kizza Besigye in Busoga, a particularly destitute rural area not far from the capital. Besigye—a former army colonel and Museveni’s doctor during the war that brought him to power—made eight speeches a day, eschewing many big towns in favor of villages that have been devastated by thirty years of corrupt leadership. This region once had a real economy, with factories and shops, now nearly all derelict. There is water six feet underground but barefoot children still haul it for miles in buckets on their heads. Besigye promised to invest in education and health care, put a stop to rampant land-grabbing, and improve farmers’ access to credit. He says he will pay for this in part by enforcing anti-corruption laws and reducing the size of Uganda’s bloated parliament and civil service, which have become huge patronage machines. If Besigye—or another opposition candidate—were to win the election, it wouldn’t solve all of Uganda’s problems, but it might break the stranglehold of a corrupt system that has put down deep roots over decades.

However, Besigye and other candidates have faced obstacles getting their messages across. In October, police threw tire-cutters in front of Besigye’s convoy without warning. Although no one was hurt, several cars collided and were damaged beyond repair. In early January, a group of displaced people invited Besigye to inspect their miserable living conditions, but police blocked the way and fired into the crowd, seriously injuring several people. Social media videos show police planting mortars and carrying assault rifles at Besigye rallies, presumably to frighten the crowds. Another candidate, former Prime Minister Amama Mbabazi, has claimed that throughout the country, his rallies have been disrupted by pro-Museveni hooligans, while the police look on and do nothing. The police deny the allegation.

Uganda seldom makes headlines, but it’s been crucial to Western security since colonial times. In 1875, Henry Morton Stanley convinced Queen Victoria that controlling the source of the Nile, then thought to be in Uganda (it’s actually in Rwanda), would give her leverage over the Mahdists and other unruly Muslim groups wreaking havoc on her empire in Sudan and Egypt downstream. Today, Uganda hosts one of the most important sites in the new chain of US military installations along the edge of the Sahara desert, from Senegal to Somalia, once again aimed at containing Islamist militants.

These bases, under construction since 2008, conduct training missions with African armies, airlift troops, and launch airstrikes against local terrorist groups such as Nigeria’s Boko Haram, Central Africa’s Lord’s Resistance Army, and Somalia’s Al-Shabbab. Christine Mungai, writing in the Nairobi-based online magazine MGAfrica, has called the new US installations a “hippo trench”: hippos attack some three thousand people a year and Africans living near lakes sometimes build trenches around their gardens because hippos can’t jump. In this case, the hippos are Islamic fundamentalists threatening to recruit terrorists to strike the US and possibly disrupt world trade routes or gain control of Africa’s uranium mines, oil wells, and other strategic resources.

Uganda’s collaboration in the hippo trench project has earned it a virtually free pass when it comes to human rights violations. Although Obama joined other Western heads of state in strong-arming Museveni into reversing a controversial anti-homosexuality law in 2014, his officials have said little about abuses of democratic rights, including those detailed in the State Department’s own annual human rights reports. Sanctions—usually small aid suspensions over corruption—have been light, temporary, and rare.

What can we expect on election day? According to a recent poll conducted by three British academics, if the elections had been held in November and December 2015, Museveni would have won 66 percent of the vote while his closest challenger, Besigye, would have received 24 percent. Opposition leaders find this hard to believe. The polls are organized with the assistance of the president’s office, they say, and conducted under the gaze of local officials appointed by Museveni.

I too wondered about this. Besigye’s November nomination brought the capital Kampala to a standstill. Hundreds of thousands of people poured into the streets, and it took his convoy five hours to drive a few miles from the Electoral Commission headquarters to a stadium for a rally. Ugandan politicians typically bribe voters at rallies with wads of shilling notes, bars of soap, or other small gifts. President Museveni has been photographed numerous times handing over canvas sacks of cash. But at Besigye’s rallies, the people have been giving him money, as well as live goats and turkeys, pieces of roast chicken, even furniture—and setting fire to their ruling party membership cards. A woman named Jane interviewed by journalists from Uganda’s Monitor newspaper walked fifteen miles just to give him five thousand shillings, or about $1.50. She had lost her sandals and her feet were bleeding, but she told the reporters she was happy to have given Besigye the money and would now go home. Museveni’s rallies have also attracted large crowds, but many supporters are paid and bussed in. Some have complained to journalists that they’d had no idea where busses were even going.

The European Union will send a few hundred observers to monitor Uganda’s elections, but they are unlikely to prevent rigging because there are roughly 30,000 polling stations. When Besigye ran against Museveni in 2006, a similarly desultory EU observer mission found electoral “shortcomings,” but they were apparently insufficient to lead to punitive steps such as a reduction in foreign aid or sanctions. After that election, Besigye petitioned the Ugandan Supreme Court to annul the results and call for a re-run. All seven judges acknowledged there had been widespread voter intimidation, fraud, and violence. According to one of the judges, he and four of his colleagues also initially agreed that these abuses justified a re-run. However, the judge, in his recent memoir, writes that two changed their minds when the president privately told them he’d call out the army if the election was annulled. The final tally was 4-3 in favor of Museveni, but the decisions were published ten months late, suggesting the majority had difficulty writing them.

If the February election outcome isn’t credible, Ugandans may decide to fight it out on their own, just as the people of Ethiopia and Burundi have been trying to do. Perhaps anticipating this, Information Minister Jim Muhwezi has warned that Museveni might let the army take over if he doesn’t win or if the opposition protests. Police Chief Kale Kayihura has meanwhile recruited hundreds of thousands of volunteer “Crime Preventers” from villages all over the country. The Crime Preventer initiative was created without legislation and the exact number of recruits and their command structure is unknown. Kayihura claims it’s modeled on Britain’s Neighborhood Watch Program, but Neighborhood Watch volunteers merely report suspicious activity in their communities to the local police and are never supposed to intervene. By contrast, many Crime Preventers wear Museveni t-shirts, are paid to attend his rallies, assault opposition supporters, and learn to strip and assemble an AK-47. Human Rights Watch and other groups have called for the Crime Preventers to be disbanded.

In an opinion piece in Uganda’s Observer newspaper, published on Martin Luther King Day, Patricia Mahoney, Charge D’Affaires at the US Embassy in Kampala, paid tribute to the slain civil rights leader and expressed concern about election violence. But her article, titled “The Path of Nonviolence is More Powerful,” seemed odd to me, given US military activity in the region. Anyway, it was not King’s fine rhetoric and charisma alone that changed America, but also the army that finally went down south and integrated the schools, protected demonstrators, and enforced the law of the land. Neither could have done it without the other. What happens in Uganda on February 18 will similarly depend in part on Uganda’s security forces, which are said to be split between loyalists and those who are as disgruntled as anyone about the problems in their country.

Reporting for this article was supported by a grant from the Pulitzer Center on Crisis Reporting.