Minnesota, a swing state that has been attacked by foreign hackers more than once, has millions in federal funds to spend on election security ahead of the 2018 midterms — but will be the only state in the country that can't touch that cash because of a standoff between Republicans and Democrats.

Mark Ritchie, a Democrat who served as Minnesota's secretary of state from 2007 to 2015, blamed the impasse on "partisan football," and said that election interference "is either not being taken seriously or, what I fear, it's the object of high alarm by some and for others, they're just fine with it."

Minnesota was one of the 21 states targeted by the Russians in 2016. Ritchie has also described previous attacks on Minnesota's online systems by foreign hackers to NBC News.

In March, Congress allocated $380 million in funding for election security to be distributed to the states by the federal Election Assistance Commission. Minnesota, which is slated to receive about $6.6 million, needed approval from both its Democratic governor and its state legislature, controlled by Republicans, before using the federal funding. But the legislative session ended in May without that approval.

Leading up to the end of the legislative session, Minnesota's current secretary of state, Steve Simon, sounded the alarm about the funding. In addition to meeting with state leaders of both parties, he testified six times in front of Minnesota House and Senate committees.

"We need these funds. The Russians attempted to hack our elections in 2016. We know they will be back in 2018," Simon, a Democrat, stated in May. "These federal dollars — not one penny of which adds to the tax burden borne by Minnesotans — are our best chance to further protect Minnesota's best-in-the-nation elections systems."

Republican Paul Gazelka, majority leader of Minnesota's Senate, said that the legislature did its duty by passing a bill that approved the federal funding. But the lawmakers did so in a $200 million omnibus spending bill that Gov. Mark Dayton vowed not to sign for reasons unrelated to the election security funding.

"I was sincere in my oft-stated desire to work with you and make these provisions become law," Dayton wrote in a May 23 letter to state leaders after vetoing the omnibus spending bill. "However, you knowingly prevented their enactment by inserting them into a bill, containing policies and agency budget cuts that I had said I would not sign."

In his letter, Dayton referred to 51 policy provisions in the bill that he opposed. Gazelka, who was "disappointed" by the veto, said Dayton's objections to the spending bill were actually "minor" and that "there wasn't much there worth vetoing the bill."

A spokesperson for the governor declined to comment, but referred NBC News to Dayton's May letter.

When asked why the election security funding, school safety and other issues both sides agreed on weren't put in separate bills, Gazelka told NBC News that there wasn't enough time in this year's legislative session, which ran from Feb. 20 to May 20.

"You definitely could have done them separate," he said. "We could have had a separate bill for funding to make sure our structures were safe. [I]n the end, it's a short session. You don't have a lot of time to get everything done and so you lump a number of things into one bill at the end just to make sure you get it done."

Although Gazelka called the election security funding a "priority," he said it "depends on the situation" whether the funding will be put into its own bill for the governor's approval when the legislature convenes again in January.

"There's no reason not to do it separate," he added. "Because it's a priority of mine, I'm certainly willing to get it done right away."

Speaker of the House Kurt Daudt, a Republican, did not respond to requests for comment.

Democrat Amy Klobuchar, Minnesota's senior U.S. senator, expressed concern Friday about election hacking in the coming midterm elections. She said she worked to secure the election security funding because states like Minnesota needed federal help.

"Earlier this year, I worked to secure critical funds to protect our elections from cyber intrusions. These funds have been granted to Minnesota and will play an important role in preparing our state for future elections once the state agrees on legislation allowing for their use," she said in a statement. "We cannot expect states like Minnesota — or Arkansas or Maine or any other state — to defend themselves from foreign adversaries on their own."

Mark Abbott, director of grants and oversight for the Election Assistance Commission, said that the commission can reimburse the state for costs they incur this year for election security, but they will have to use existing state funds. However, reimbursement won't be possible for Minnesota, according to Ben Petok, director of communications for the Minnesota secretary of state's office.

"We can't spend what we don't have," he explained.

Yet, despite not having federal funding, the office has engaged in other efforts to secure Minnesota's elections, Petok said. These efforts include providing security guidance to counties and cities as well as grants for equipment upgrade, implementing software patches on the state voter registration system and multifactor authentication and working with federal intelligence officials to conduct vulnerability assessments of their systems, which is why Simon is still "confident" ahead of the midterm elections.

"We are today faced with the very real likelihood that some outside force will target our elections systems," Simon told NBC News. "My office has worked since 2015 to harden our cyberdefenses and protect voters' private information. We successfully repelled an attempt in 2016 to breach our systems and I am confident that Minnesota today is more prepared than ever before to confront and rebuff any threat to our elections system."