NAIROBI (Reuters) - Kenyan police arrested an American election data expert working with opposition leader Raila Odinga’s National Super Alliance (NASA) ahead of Aug. 8 polls, an opposition senator and the U.S. embassy said on Saturday.

Senator James Orengo said John Aristotle Phillips, chief executive of political technology and data provider Aristotle Inc., was detained late on Friday along with a Canadian national, whom he did not name.

The pair were being deported, he added.

Besides his work on political data analysis, Phillips is known in the United States as the “A-Bomb Kid” for designing an atomic weapon from publicly available information while studying as an undergraduate at Princeton in the 1970s.

“The police invaded their apartment,” Orengo told a news conference, adding that the pair were manhandled and thrown into the back of a vehicle.

The U.S. embassy in Nairobi confirmed that an American and a Canadian had been detained and were leaving the east African country ahead of Tuesday’s electoral showdown between Odinga and President Uhuru Kenyatta.

“They’re safe & departing Kenya,” the embassy said on Twitter, without elaborating.

Two police spokesmen contacted by Reuters did not answer their phones or respond to text messages requesting comment.

Opinion polls suggest Kenyatta, the son of Kenya’s first president, and Odinga, who is fighting his fourth presidential election, are neck-and-neck, leading many Kenyans to fear a disputed result and possible violence.

Odinga told Reuters this week Kenyatta could only win by rigging the vote, a stance that intensified public concerns of violence after the murder of a senior election commission technology expert.

Kenyatta responded by challenging Odinga to produce the evidence.

In 2007, Odinga’s call for demonstrations after a disputed result triggered ethnic clashes in which at least 1,200 people were killed. He also disputed the outcome of a 2013 election but limited his complaints to the courts, not the streets.

The BBC said this week Kenyatta’s ruling Jubilee Party had hired Cambridge Analytica, another data-mining company, to advise its campaign. Cambridge Analytica was also used by Donald Trump in his U.S. presidential run.