RALEIGH, N.C. (AP) — Democrats in top North Carolina statewide races are substantially outraising Republicans this election cycle, with millions being spent by outside groups supporting their candidacies.

Democratic Gov. Roy Cooper took in more than $17 million for his reelection campaign between July 1 and Oct. 17, according to the latest quarterly filing due this week at the State Board of Elections. Cooper’s total is much higher than the nearly $4 million raised during that time by his Republican opponent, Lt. Gov. Dan Forest.

Cooper, who has gotten high marks from fellow Democrats for his handling of the COVID-19 pandemic, has put his money to work by flooding the airwaves with messages criticizing his opponent for not taking the virus as seriously as he believes the lieutenant governor should.

Forest has struggled to keep up on television with the incumbent, but his message in seeking to attract voters is focusing on more aggressive reopening of schools and businesses.

More than 80% of the roughly $4 million Forest raised over the 3 1/2-month period came from individual contributors, according to the campaign filing data. Cooper received even more money from individuals at $5.2 million, but that amount accounted for about 30% of his quarterly total. More than $11 million he raised was given by political party committees and $281,000 came from other political committees.

To date, Cooper has tripled Forest’s fundraising total. Since the start of the campaign cycle in early 2017, Forest has received $10.9 million, which is well shy of Cooper’s $36.3 million.

The race carries national significance, as it is one of a small handful of gubernatorial races considered competitive. Still, polls consistently have shown Cooper ahead. The race can also set the tone for other Democrats in the state up and down the ballot, including presidential nominee Joe Biden.

Democrats in other top statewide races also had comfortable financial leads entering the final days of the campaign ahead of Tuesday’s election.

Democratic Attorney General Josh Stein’s campaign reported collecting $5.2 million in the third quarter. His GOP challenger, Forsyth County District Attorney Jim O’Neill, reported raising $329,000 during the same period.

Stein has raised $11.7 million this election cycle, which is 12 times higher than the $963,000 that O’Neill has received. Both candidates are benefiting from outside groups sending mailers to voters.

The most significant outside intervention in a state-level race appears to be the campaign for lieutenant governor, where former Democratic presidential candidate Michael Bloomberg is giving millions of dollars to back Democrat Yvonne Holley.

Campaign reports filed since last week show the former New York mayor and billionaire giving $8.7 million for North Carolina political activities to the Beyond Carbon Victory Fund he created to promote clean energy. Nearly all of the money was spent to advertise for Holley, a state House member from Raleigh who is running against Republican Mark Robinson of Greensboro.

The winner could yield major power if the state Senate is evenly split between the two parties following next week’s election. The lieutenant governor can break ties on the Senate floor.

Holley’s campaign reported raising $943,000 in the third quarter and $1.3 million since the start of the campaign. Robinson’s third-quarter report had not been posted online at the state board’s site as of Thursday evening.

Voters also are picking three justices for the state Supreme Court and five judges on the Court of Appeals.

The premier judicial race is for Supreme Court chief justice, where Democratic incumbent Cheri Beasley reported raising $829,000 in the quarter and $1.9 million for the election cycle. Opponent Paul Newby, a Republican and current associate justice, reported $295,000 raised during the quarter and $893,000 overall.