Greg Gianforte, the Republican candidate for Montana’s open House seat, stands to get tax cuts worth nearly $800,000 a year if the House health care bill becomes law, according to a new analysis.

The American Health Care Act, as the Republican bill that passed the House of Representatives is known, repeals the two tax hikes on higher earners that the Affordable Care Act used to fund expansion of insurance coverage: a 3.8 percent tax on net investment income and a 0.9 percent increase in the Medicare Hospital Insurance tax. Both taxes apply to individuals making $200,000 a year or more, and married couples making $250,000 a year or more.

Based on Gianforte’s average yearly investment and wage income from 2005 to 2014, his annual tax bill would go down $785,413 if the AHCA passed, according to an analysis released Friday by the Center for American Progress Action Fund and Tax March, an organization backed by labor unions and progressive groups.

CAP Action Fund senior fellow Seth Hanlon, a tax attorney who worked for former President Barack Obama, conducted the analysis.

Hanlon calculated the size of the tax cuts based on the income reported in tax returns for Gianforte and his wife Susan from 2005 to 2014. Gianforte released them as part of his failed bid for governor of Montana in 2016.

Gianforte, 56, founded two successful software companies, including RightNow Technologies, which he sold to Oracle for $1.5 billion in 2011.

He and his wife made, on average, over $20 million a year in investment income and $1.6 million a year in ordinary wages over the 10-year period for which Gianforte disclosed his earnings. Assuming he continued to maintain this average going forward, he would get a $772,981 annual tax break from repeal of the net investment income tax and another $12,432 from elimination of the Medicare Hospital Insurance surtax.

Shane Scanlon, a spokesman for Gianforte’s campaign, did not respond to a request for comment on the law’s financial benefits for the GOP candidate.

William Campbell/Getty Images Greg Gianforte, the Republican candidate for Montana’s open House seat, stands to benefit financially from the American Health Care Act.

Gianforte is hoping to fill a seat that Ryan Zinke vacated when Trump picked him to become interior secretary.

He is locked in an increasingly close race with Democrat Rob Quist, 69, a folk music sensation in the state who is running on a populist platform of protecting public lands and making health care more affordable. The special election is this coming Thursday.

In the past two weeks, Quist has made an issue out of Gianforte’s murky stance on the Republican health care law, which the nonpartisan Congressional Budget Office estimated would deny at least 24 million Americans health insurance. The law would have a significant impact in Montana, where the state’s uninsured rate dropped from 20 percent in 2012 to 7.4 percent in 2016 thanks to Obamacare.

Gianforte told Republican-leaning lobbyists in a private call on May 5 that he was “thankful” that the House had passed the AHCA, according to The New York Times. He has since walked back the comment, telling Montana Public Radio that he would not have voted for the law, because “we don’t have enough data yet” to determine if it would bring down premiums, protect people with pre-existing conditions and maintain access to coverage in rural communities.

The latter comments have not deterred Quist in his efforts to paint Gianforte as an unreliable defender of Montanans’ health care. Quist raised $550,000 in the four days following the Times report ― part of a more than $5 million haul that has come from over 200,000 individual donors.

In the past two weeks, Quist has made an issue out of Gianforte’s murky stance on the Republican health care law.

Quist’s campaign has plowed some of that cash into ads hitting Gianforte for voicing support for the law.

The campaign’s two closing ads focus on the AHCA’s rollback of federal protections for people with pre-existing medical conditions. The law would allow states to opt out of community rating regulations in Obamacare that require insurers to provide coverage at regional rates for people in the individual insurance market, rather than charge much higher premiums for people with past illness or other health histories the insurance industry has called “pre-existing conditions.” Those states that choose to opt out would have to create high-risk pools to cover those people, but conservative and liberal experts alike believe the federal funding for those pools would be woefully inadequate.

In the ads, Quist discusses his own pre-existing condition from gallbladder surgery, claiming he is one of an estimated half of Montanans who have what would be considered a pre-existing condition.

Quist struggled with medical debt for years after the surgery, which was botched and left him unable to afford insurance for a time due to a pre-existing condition. He has said that he supports single-payer health insurance because he does not want people to go bankrupt trying to pay for health care.

The CBO has announced that it will release updated estimates of the Republican health legislation’s impact this coming Wednesday. The analysis is expected to show that the current version of the House bill would deprive more people of insurance than the earlier iteration, which preserved more features of Obamacare.

Polling in the Montana House race has been sparse, but the available figures suggest Quist has gained ground against Gianforte.

A May poll that a Democratic super PAC commissioned has Quist trailing Gianforte by 6 points, compared with an April survey showing him down some 15 points. After initially ignoring the race, the national Democratic Party has taken a greater interest in the past few weeks, with the Democratic Congressional Campaign Committee tripling its investment to $600,000 this month.

The Republican Party is apparently also taking Quist seriously. President Donald Trump’s eldest child, Donald Trump Jr., returned to Montana last week to campaign for Gianforte a second time, and Vice President Mike Pence stumped for him last Friday.

Apparently the high-profile visits were not enough to stem Quist’s momentum. On Tuesday, influential conservative writer Erick Erickson tweeted that internal Republican polls show Quist made gains in the race over the weekend.

Sen. Bernie Sanders (I-Vt.), whom Quist backed in the 2016 presidential primary, is speaking at events for Quist in Missoula, Butte and Billings on Saturday and in Bozeman on Sunday. Quist’s campaign had to move the Missoula rally to the 7,500-capacity Adams Center arena because of the high level of interest in attending.

The story has been updated with the CBO’s announcement that it will soon release new estimates for the American Health Care Act.