 Mississippi State Sen. Chris McDaniel, R-Ellisville, received a $500,000 donation for his campaign for U.S. Senate thanks to GOP mega-donor Robert Mercer, the investor behind a firm that harvested the data of 50 million Facebook users during the 2016 election.

Mercer, a New York hedge-fund manager, donated $500,000 to the pro-McDaniel "Remember Mississippi" PAC on Oct. 2, new FEC filings show.

It's not the first large contribution from Mercer to the PAC. In 2017, he also donated $500,000 to the fundraising committee in anticipation that McDaniel would challenge incumbent Republican U.S. Sen. Roger Wicker.

McDaniel initially launched a bid to unseat Wicker in February, but switched races after former Sen. Thad Cochran retired in March. He is now challenging incumbent Republican U.S. Sen. Cindy Hyde-Smith, whom Gov. Phil Bryant appointed to fill the vacancy in April.

Mercers Backed Trump, Data-Mining and 'Exploited Facebook'

In 2016, Mercer and his daughter, Rebekah Mercer, donated millions to Donald Trump's campaign for president.

Most significantly, the Mercers convinced the Trump campaign to buy the services of Cambridge Analytica, the data analytics firm that used secretly collected social-media data to create profiles and target voters with fake news reports and psychological manipulation.

The firm has since come under scrutiny from special counsel Robert Mueller, who is investigating potential ties between the Russian government and the Trump campaign.

The Mercers invested in the firm in 2014 and brought on Steve Bannon—who would eventually become the chief executive officer of the Trump campaign and later a top adviser in the White House—as vice president.

Long before Trump announced his presidential campaign, Cambridge Analytica began testing anti-immigrant messages. The phrases included Build the Wall," "Deep State" and "Drain the Swamp"—all phrases later used by the Trump campaign and in his subsequent presidency.

Cambridge Analytica also tested the phrase "Race Realism"—meant to imply the rollback of civil-rights protections for African Americans—but it never made it into the campaign.

"We exploited Facebook to harvest millions of people's profiles and built models to exploit what we knew about them and target their inner demons," Christopher Wiley, who Cambridge Analytica hired to lead the data gathering project, told The Guardian in March. "That was the basis the entire company was built on."

To harvest the data of Facebook users, the firm put out fake social-media personality quizzes. To take the quiz, Facebook users had to agree to allow an app to access their data; users were then encouraged to share those quizzes with their friends, who could also take the quizzes in turn.

The Trump campaign paid Cambridge Analytica $5.9 million for its services in 2016, with $5 million of that coming in September. That is when Bannon came on as campaign CEO, and GOP pollster Kellyanne Conway—a friend of the Mercers—joined as Trump's new campaign manager.

Alexander Nix, the firm's former CEO, admitted earlier this year that, during the 2016 campaign, he reached out to Wikileaks founder Julian Assange and asked if he would give them hacked emails from Trump's opponent, Hillary Clinton. Both men say Assange declined.

In 2016, hackers working on behalf of the Russian government hacked into the Democratic National Committee's email servers. Wikileaks later released the stolen emails, specifically leaking emails designed to stir discord in the Democratic Party in order to hurt Clinton.

Last fall, Mueller requested emails from Cambridge Analytica employees who worked with the Trump campaign. Five members of the firm worked with Trump's digital team.

Before the Trump campaign hired Cambridge Analytica, the firm worked for the campaign for Ted Cruz, whom the Mercers initially backed.

In the 2016 primaries, McDaniel supported Cruz. GOP establishment opponents have since highlighted critical statements the Mississippi state senator made about the president while he and Cruz were still battling for the nod.

PACs and Senate Candidates: Legally Separate But Lucrative

Last year, Bannon backed McDaniel's plans to challenge Wicker. McDaniel told The New York Times last September he had been in contact with the Mercers and received assurances that he would have their support.

"Robert Mercer was one of Donald Trump's biggest donors," McDaniel told the Jackson Free Press today. "He's on my side. Meanwhile, one of Hillary Clinton's biggest donor is for Cindy Hyde-Smith. It's time to pick a side."

That donor, Sean Parker, the founder of Napster and co-founder of Facebook, gave $250,000 to the pro-Hyde Smith Mississippi Victory Fund in April. While Parker did donate $300,000 to Clinton in 2016, he has contributed to both Democrats and Republicans in the 2018 cycle, including South Carolina Republican U.S. Sen. Tim Scott.

Former State Sen. Merle Flowers, R-Olive Branch, and Henry Barbour, the nephew of former Republican Gov. Haley Barbour, run the Mississippi Victory Fund.

Though McDaniel founded the Remember Mississippi PAC in 2014 after his failed bid to unseat Cochran in the Republican U.S. Senate primary, federal law prohibits candidates from coordinating with PACs.

Outside of PACs, Hyde-Smith and Espy lead McDaniel in direct donations to their campaigns, where individual donors are legally limited to maximum donations of $5,000. During the cycle, Hyde-Smith has brought in $2.7 million, Espy $1.5 million, and McDaniel $1 million.

In the third fundraising quarter, which ran from July to September, Espy led Hyde-Smith with around $1.2 million compared to her $1 million. McDaniel's campaign only brought about $200,000 in the same period.

The Daily Journal published a video of a private conversation in which Hyde-Smith tells a woman she does not want to join her opponents for a debate because it would be "like handing him a $200,000 campaign donation because (McDaniel is) way down in the polls, and he's wanting the TV shot."

When Bryant appointed her, Hyde-Smith became the first woman from Mississippi to serve in Congress and could be the first elected come November. If Espy wins, he would be the first black U.S. senator from the state since Reconstruction, when Sens. Hiram Revels and Blanche K. Bruce represented the state in Washington, D.C., until the end of Reconstruction brought the disenfranchisement of black voters.

On Nov. 6, the same day as the national midterms, voters choose between Espy, Hyde-Smith and McDaniel in a nonpartisan special election. If no one gets more than 50 percent of the vote, the top two vote-getters will face one another in a Nov. 27 runoff. Incumbent Republican U.S. Sen. Roger Wicker and Democratic rival David Baria also face off that day, and U.S. House seats are up in all four of Mississippi's congressional districts.

Voters must bring a valid form of photo ID such as a driver's license or a student ID to vote. Polls in Mississippi are open from 7 a.m. to 7 p.m.

Ashton Pittman covers politics and elections for the Jackson Free Press. Follow him on Twitter at @ashtonpittman. Email him at [email protected]. Read more 2018 campaign coverage at jfp.ms/2018elections.

If you experience any issues at polling places, including wait times or registration problems, the Jackson Free Press wants to hear from you. We partnered with ProPublica's Electionland to gather tips on Nov. 6. To participate, you can text the word VOTE to 81380, send a message on WhatsApp +1 (850) 909-8683, use Facebook Messenger or send a tweet to @Electionland. You can also call our newsroom directly (601) 362-6121.