Former South Dakota governor Mike Rounds (R). (AP Photo/Nora Hertel, File)

The battle for the Senate majority could wind up turning on a complex immigration investment scandal that sounds like the plot of a Coen Brothers film.

The labyrinthine subplots involve a suicide (and doubts about whether it was really a suicide), secret business dealings, lawsuits, bankruptcies and a state legislative probe related to the now-shuttered program.

At the center of it all: former South Dakota governor Mike Rounds (R). Long heavily favored to win his state's open Senate seat, Rounds has been plagued by questions about a green card program for foreign investors that operated problematically when he was governor. The immigrant investment controversy has drowned out most everything else in the campaign, opening the door for Democrat Rick Weiland and independent Larry Pressler -- and Rounds now finds himself locked in a closer-than-expected contest that has opponents eyeing an upset.

Republicans need to gain six seats for the Senate majority. An upset win by Weiland or Pressler, a former GOP senator who supported President Obama in 2008 and 2012 and has not said which party he would caucus with in the Senate, could short-circuit the Republican push to take control of the chamber.

National Democrats this week kicked off a well-funded campaign to draw more attention to the saga they have dubbed Rounds’s “Citizenship for sale scheme.”

"The fallout. The investigations. Turns out there's more," says the narrator of the latest Democratic attack ad.

The attacks have left Rounds publicly insisting he's done nothing wrong, and national Republicans racing to defend the ex-governor. Compounding GOP woes: until recently, Rounds -- who was governor from 2003 until 2011 -- was committed to running a purely positive campaign in which he stubbornly refused to air attack ads. His opponents did not subscribe to that policy.

“What essentially happened was the Democrats effectively shaped the contours of the campaign,” said Jon Schaff, a Northern State University political scientist. The race has “become all about Mike Rounds. Rounds waited a long time to punch back, and we’ll see whether he waited too long,” he added.

EB-5, the federal program which has become shorthand for the scandal, was created in 1990 to allow foreigners to earn green cards by investing in or loaning money to business enterprises that create U.S. jobs. As governor, Rounds championed the program.

Last fall, Democrats distributed documents showing that Joop Bollen, a state official who oversaw EB-5 in the Rounds administration, contracted with a company to help administer the program. What he didn't initially say was that he owned that company.

The sudden death later in the fall of Richard Benda, a Rounds-appointed state tourism and development secretary who promoted EB-5,  thrust the circumstances surrounding the program further into the spotlight. Benda's death -- ruled by authorities to be a suicide by gunshot wound -- came as he was facing an arrest for allegedly funneling state money to himself, information that surfaced after he died. Some even questioned whether Benda was killed by someone else.

Meanwhile, Rounds recently sought to amend testimony before a state legislative panel about EB-5 after a local paper revealed a document that contained information at odds with his initial account.

In an interview with The Washington Post last week, Rounds decried the Democratic attacks against him and said he was not shying away from talking about the program, which he said had helped the state.

“We don’t mind discussing the program itself as long as the points of contention are factual in nature,” said Rounds.

Democrats have sought to link Rounds to the state officials who oversaw EB-5 -- to portray him as an enabler of individuals who sought to make money off the program, and sow doubts about it.

“I don’t think we should be selling citizenship,” Weiland said in an interview. He has proposed ending the federal program altogether.

Rounds is not the first politician to be tripped up by EB-5. Now-Virginia Gov. Terry McAuliffe (D) came under scrutiny in 2013 over questions about whether a company he started was a scheme to attract foreign investments.

The Democratic Senatorial Campaign Committee, which last week committed to spending $1 million in South Dakota, released a 30-second TV ad on Monday focused on Northern Beef Packers. The company was funded by EB-5 investments and another company that loaned it money but was exempted from state banking regulations. It declared bankruptcy in 2013.

In recent letters to state legislators, Rounds singled out Benda for blame on EB-5 problems. Schaff, the political scientist, said that while Rounds may not have had a direct hand in the way EB-5 was run on his watch, that won't spare him some political consequences.

“It would be the equivalent to saying that Barack Obama really should have known what happened at the Cincinnati IRS office," said Schaff, referencing the IRS scandal in which the agency was accused of targeting conservative groups for extra scrutiny. "Barack Obama doesn’t do that nor does the governor of South Dakota. But that doesn’t turn into an effective sound bite.”

Two public polls out in recent weeks have shown Rounds leading, but narrowly. In addition to the DSCC, several other Democratic or Weiland-aligned groups have vowed to weigh in during the race's final three weeks. Every Voice Action, a pro-Weiland super PAC, has already launched TV spots attacking Rounds over EB-5.

Republicans have signaled a more aggressive approach is coming to combat the Democratic attacks. The National Republican Senatorial Committee launched an ad Tuesday hitting Pressler and Weiland. Rounds has started airing ads in recent days distinguishing himself from his two opponents, whom he links to President Obama and his policies. He also recently released another ad defending himself on EB-5.

“Democrats have had their fun with EB-5,” said Dick Wadhams, a consultant to the state Republican Party.

But the story continues to dominate local media coverage, grabbing front pages in the state over the weekend.

All three major candidates face big challenges in the home stretch. Weiland, a former Tom Daschle aide who was not a top recruit, is still trying to build name recognition. Pressler is trying to spring an upset with a bare-bones campaign. Rounds, while battling EB-5 scrutiny, says he is focused on retail politicking. He used a football metaphor to describe his approach.

“We’re trying to see as many people as possible on a face to face basis," said Rounds. "That’s just blocking and tackling."