On August 8, millions of Kenyans formed long, orderly lines outside polling stations across the country to vote in presidential and local elections. Kenya is notorious for corruption, and virtually all prior elections had been marred by rigging. This time, however, the US and Kenya’s other donors had invested $24 million in an electronic vote-tallying system designed to prevent interference. When Kenya’s electoral commission announced on August 11 that President Uhuru Kenyatta had won another five-year term with over 54 percent of the vote, observer teams from the African Union, the European Union, and the highly respected US-based Carter Center, led by former Secretary of State John Kerry, commended the electoral process and said they’d seen no evidence of significant fraud. Congratulations poured in from around the world and Donald Trump praised the elections as fair and transparent.

But not everyone was happy. Raila Odinga, leader of the opposition National Super Alliance party, or NASA, declared the election a sham as soon as the results began coming in. On August 18, he submitted a petition asking Kenya’s Supreme Court to annul it and order a re-vote. The petition claims, among other things, that nearly half of all votes cast had been tampered with; that NASA’s agents, who were entitled by law to observe the voting and counting, had been thrown out of polling stations in Kenyatta strongholds; and that secret, unofficial polling stations had transmitted fake votes. The Supreme Court is expected to rule on September 1, but on August 29, the court registrar reported that some 5 million votes, enough to affect the outcome, were not verified.

Signs that something weird was going on emerged well before the election. A month earlier, Kenya’s electoral commission contracted Ghurair, a Dubai publishing firm, to print ballots. Newspaper reports linked the company to Kenyatta’s inner circle, and Kenyan courts ordered the electoral commission to use a different firm. The order was ignored, and the electoral commission issued a single-source contract to Ghurair anyway, citing time pressure. Then the accounting firm KPMG reported that more than a million dead people might still be registered as voters. NASA officials complained that Ghurair could print extra ballots to be used to create pro-Kenyatta ghost votes. Kerry dismissed these concerns, quipping after the election, “The people who voted were alive. I didn’t see any dead people walking around.”

Ten days before the election, the brutally tortured corpse of the electoral commission’s IT manager, Chris Msando, was discovered in some bushes outside Nairobi. CCTV footage shows his car roaming around the city for hours in the middle of the night before he died. Also in the car were two men and a woman, whose dead body was discovered beside Msanado’s, suggesting a “love triangle” explanation. Many Kenyans expressed skepticism. Msando managed the electronic system for transmitting results from polling stations, and he’d been complaining to the police of death threats for weeks. Kenya’s donors, including the EU’s ambassador to Kenya, praised the government for its commitment to investigating the murders, though many Kenyans suspected the police of being involved in them. But when the US and UK offered to help with the investigation, the police declined. Kerry warned the opposition not to politicize the killing.

A week before the election, a team of US and Canadian advisers who had been helping Odinga’s campaign set up a parallel system to verify the vote counting were arrested at gunpoint and deported. Then Odinga’s spokesman fled too, citing death threats. Then the NASA vote-counting office was ransacked. The Carter Center noted in its report that the raid had probably been carried out by Kenyan security personnel.

Election day brought more problems. According to Kenya’s electoral laws, representatives from all political parties are permitted to witness the voting and the counting of ballots in polling stations after polls close. Each representative then signs a form known as 34A, certifying the count, and receives a carbon copy. The new $24 million system was supposed to enable scans of the 34A forms to be sent to the electoral commission and posted online immediately, so they could be double checked by all parties and the public. But that system broke down at polling stations all across the country, so only the numbers were sent to Nairobi, often not by the new system but by text message. NASA officials pointed out that these numbers could have been changed en route and noted various suspicious findings in the unofficial early returns, including 100 percent voter turnout at some polling stations—with all votes for Kenyatta; a consistent 11 percent spread between Odinga and Kenyatta during the vote counting—a virtual statistical impossibility; and a phenomenon known as “unvoting,” in which the totals for some candidates actually fell as more votes came in. In his remarks on behalf of the Carter Center, Kerry admitted that there had been some “little aberrations here and there,” but none that “we thus far feel affected the overall integrity of the process.”

Electoral commission officials were supposed to deliver their 34A copies to one of 290 constituency-level centers, where the totals would be recorded on forms known as 34Bs. Copies of all 34As and 34Bs were then supposed to be delivered physically to the national tally center in Nairobi, where they were to be put online—if they had not been already. But almost none were actually online on the day Kenyatta was declared the winner.

Shortly before departing Kenya, John Kerry praised the electoral commission for having done an “extraordinary job to ensure that Kenya has a free, fair and credible poll.” He then urged the opposition to “get over it and move on.”

People who have witnessed election fraud in other African countries have told me that it’s normally done by making small changes to large numbers of tallies and this appears to have happened in Kenya, where there were over 40,000 polling stations. After NASA submitted its petition, a team of American experts led by University of Michigan Professor of Statistics and Political Science Walter Mebane volunteered to conduct a forensic analysis of the results. Results that have been tampered with show patterns and Mebane’s computer program identified over half a million fraudulent votes in this manner—almost certainly an underestimate of the true number.

According to Mebane, the paper forms provide the true test of the integrity of the election. The Supreme Court’s registrar assembled a team of experts to physically examine the 34A and B forms that the electoral commission claimed to have used to arrive at the final results. According to their analysis, scores of 34B forms have irregularities—many lack official stamps, serial numbers, and watermarks. Many 34As appear to have similar problems. According to an affidavit submitted in support of NASA’s petition, some are signed in the same handwriting, some come from polling stations that didn’t officially exist, and some show results that differed from the totals on the copies of the form in NASA’s possession and from the totals announced by the electoral commission. When a NASA IT team examined the logs of the electoral commission’s server, it found that numerous unauthorized users had entered the system before and after the election, that the electoral commission chairman had uploaded and removed 34A forms, and that some polling center results had been added before the election had actually occurred.

Despite the growing evidence that the election was a fraud, Kenya’s notoriously corrupt judiciary may dismiss the case. When Odinga disputed Kenyatta’s victory after a similarly flawed election in 2013, the justices ruled that the election should stand, even though results from much of the country are not available even now, and probably never will be.

Another rigged election in Africa is not news. But that US election observers were so quick to endorse it is shocking. Perhaps they believed that wrapping the election up quickly would prevent violence. After Kenya’s 2007 election, which most observers have since concluded was rigged against Odinga, some of his supporters went on a looting and killing spree in ruling-party strongholds. Gangs backed by ruling-party officials fought back and the ensuing mayhem left more than a thousand people dead, caused hundreds of thousands to flee their homes, and nearly shut down the economy of much of eastern Africa, which relies on transport from the Kenyan coast. Members of Odinga’s coalition were quoted making ethnically charged statements, but it was Kenyatta and his current deputy, William Ruto—who was then allied with Odinga, but has since switched sides—who were charged by the International Criminal Court with crimes against humanity for organizing and supporting the violent gangs. (The cases against them collapsed after witnesses were intimidated or died under mysterious circumstances.)

If the observers think urging Odinga to “move on” will avoid a rerun of 2007, they are likely mistaken. The Bush White House’s rush to congratulate Odinga’s rival, Mwai Kibaki, after the rigged 2007 election helped fuel the violence that followed.

A far more troubling possibility is that the US wants Kenyatta to remain in power, at the expense of democracy. Kenya lies in one of the most volatile regions of the world. Its neighbor Somalia has been a war zone for a decade; conflict in South Sudan has sent more than two million refugees scrambling to neighboring countries, including Kenya, since 2013. Two of Kenya’s other neighbors, Uganda and Ethiopia, are ruled by US-backed autocrats who have instigated or worsened these conflicts. Ethiopia’s US-assisted invasion of Somalia in 2006 set off the mayhem there, promoting the rise of the Islamist terrorist group Al-Shabaab. In 2014, Uganda entered the South Sudan civil war on the government’s side. Humanitarian organizations called for an arms embargo, which would have made Uganda’s involvement illegal. The UN Security Council, including Russia and China, seemed open to an embargo, but the Obama did not pursue it.

Kenyatta, a drowsy-looking bon vivant and the son of Jomo Kenyatta, Kenya’s first post-independence president, is supported by a powerful network of Kenyan politicians and businessmen, mostly of Kikuyu ethnicity, who have been looting the country for decades. He has aligned Kenya with US policy by, for example, deploying Kenyan forces in AMISOM, the US- and UK-supported African Union peacekeeping mission in Somalia.

Odinga, a taciturn, ambitious seventy-two-year-old of Luo ethnicity, whose father was Jomo Kenyatta’s post-independence vice-president and later his rival, has long nursed a grudge against Kenyatta’s Kikuyu elite. He spent ten years in jail for participating in a failed coup against Jomo Kenyatta’s hand-picked successor, Daniel Arap Moi, in 1982 and he fought vigorously for Kenya’s progressive 2010 Constitution which weakened Kenya’s formerly all- powerful presidency and made local officials more accountable to their people. Odinga has pledged to deliver a plan to withdraw Kenya’s troops from Somalia in the first ninety days of his presidency. NASA officials point out that the AMISOM deployment has provoked terrorist attacks on a Nairobi shopping mall and a university, killing hundreds and devastating Kenya’s tourist industry. Odinga is also close to South Sudan’s beleaguered opposition, and might help force the US-backed government into negotiations. This is something the Obama administration seems not to have wanted, and the Trump administration seems not to either.

When I asked a member of the Carter Center delegation why his team was so confident about Kenyatta’s victory, he sent me a six-page report by a US-funded Kenyan NGO called the Election Observer Group. It describes a “verification” survey of the presidential results from 1,703 randomly selected polling stations around the country. According to the report, the survey predicted the electoral commission’s final results to within 0.3 percentage points for all eight candidates, including very minor ones who’d received only a few thousand votes.

It was obvious at once that something wasn’t right with this report. The NGO’s projected results were suspiciously accurate and the authors neglected to describe their sampling strategy. The sampling strategy is crucial—after all, voter preferences are not randomly spread around the country but clustered, with Kenyatta’s supporters in some regions and Odinga’s in others. A spokesman for the NGO told me that the survey was carefully stratified, but after carrying out a similar “verification” study during Kenya’s 2013 election, the same NGO declined requests to share its methodology until months after the contested vote, and when it did, several polling stations in the planned sample were reportedly missing.

A statistician friend who looked over the report for me put it this way: “Working backwards, from a known… or desired… election outcome, even I would know how to choose 1,700 polling stations to make results work. You would simply toss into the hopper Kikuyu area polling stations or remove Luo stations as needed.” Kikuyus tend to support Kenyatta; Luos, Odinga.

The Carter Center official was sanguine: “This [report] makes it highly unlikely that a large scale systematic manipulation—digital or manual—occurred during tabulation,” he wrote me. “Any significant discrepancies would have been discovered in the parallel count.”

But the study he was touting seemed to me like a piece of fake news—a flood of which had poured into Kenya around the election, virtually all pro-Kenyatta and/or anti-Odinga. Reports that Odinga had killed white farmers and that American think tanks believed Kenyatta would win appeared on newly created, convincing-looking blogs like “Foreign Policy Journal” and on mock-ups resembling Kenya’s largest daily, The Nation. While cooked-up stories about celebrities and UFOs are common in Africa, partisan fake news like this is not.

Days before the election, an official-looking document—that may or may not be genuine—was leaked to an opposition member of parliament. It described plans to deploy “regime friendly” soldiers to two of Nairobi’s largest slums, both packed with Odinga supporters. In case the people rose up after the results were announced, these men were to cut off the water and electricity supplies and block access to the city center.

A few days after the election, an obviously fake “Embassy cable” began circulating on Whatsapp, complete with US government heading and transmission codes. The unsigned author, addressing his or herself to the “Secretary of State,” predicted that if Odinga won the election, his tribesmen would be so happy they’d go on a rampage for months, looting and pillaging and destabilizing eastern Africa. While the predictions in the document are absurd, they reflect what many Kenyans probably think Americans think of them, and seemed designed to demoralize those Kenyans who have long suspected a US hand in the rigging of their elections.

Last spring, Kenyatta’s party hired, for a reported $6 million, the data research firm Cambridge Analytica, which helped elect Donald Trump and sway Britain’s Brexit vote. Cambridge Analytica’s parent company is Strategic Communications Limited, which is now working for the State Department. Articles in Slate and Politico suggest that SCL has in the past engaged in disinformation campaigns to sway elections in developing countries. The company denies this.

The most disturbing article concerning the Kenyan election appeared on the New York Times editorial page two days after the results were announced. Entitled “The Real Suspense in Kenya,” the editorial claimed that election observers had “witnessed no foul play,” even though the Carter Center’s report, in contrast to the observer’s public statements, mentions Msando’s killing, the NASA office raid, and the problems with the transmission of results.

The editorial also accused Odinga of “fann[ing] the embers of ethnic strife,” when he’d actually urged his supporters to remain calm. NASA considered organizing a nonviolent protest—permitted under Kenyan law—but deemed it too dangerous. There was spontaneous protesting and some sporadic looting in Odinga strongholds after Kenyatta’s victory was announced, but according to human rights groups, there is no evidence that this was organized, or that Odinga or NASA had anything to do with it. As the Times editors should have known, there was election-related violence, but virtually all of it was carried out by government security forces. For days after the results were announced, special police units cracked down mercilessly, killing at least twenty-four people in Odinga strongholds. The police claimed the victims were criminals or inciting violence, but this is doubtful. In the lakeside city of Kisumu, police went house to house, hurling teargas and beating and shooting people. Some victims were dragged out of bed and killed. At least ten deaths have been so far documented in this city alone, and more than a hundred others were beaten or suffered gunshot wounds. Among the dead are a nine-year-old girl shot by a stray bullet in Nairobi while playing on her balcony and a six-month-old beaten to death, in her own house, while in her mother’s arms. After Kisumu Governor Peter Anyang Nyong’o told reporters that fishermen had discovered five corpses in body bags floating in Lake Victoria, at least one of which had bullet wounds, the police claimed they were all drowning victims.

The Times editorial also failed to mention that reporters covering the police abuses have been beaten and arrested and that two highly respected Kenyan NGOs investigating them were closed down and raided by the police. A similarly misleading editorial appeared in The Washington Post on the day the election results appeared.

The US government has a disturbing history of meddling in the politics of developing countries; during the cold war, it also influenced some of our most prominent editors and journalists to downplay human rights abuses committed by its undemocratic allies. In countries like Kenya, where important US interests are at stake, the onslaught of mass-media distortions, and biased international election observers and Western-backed NGOs, suggest the possibility of concerted strategy. As the Chinese general Sun Tzu put it in his famous book The Art of War, “To subdue the enemy without fighting is the acme of skill.” But to do that, you need to make him feel he has already lost.

This post has been corrected. The irregularities in the 34A forms were reported in an affidavit in support of NASA’s petition, not by the Supreme Court registrar; the irregularities in scores of 34B forms were reported by the Supreme Court registrar. The team that examined the logs of the electoral commission’s server was from NASA, not appointed by the Supreme Court. In 2007, members of Odinga’s coalition were quoted making ethnically charged statements, not Odinga himself.