YORK, Pa. — Scott Wagner, who quickly ascended to power after defying the establishment and running a successful write-in campaign for the Pennsylvania State Senate in 2014, on Tuesday secured the Republican nomination for governor, setting up an Election Day matchup between him and a fellow millionaire and York countian Gov. Tom Wolf.

State Sen. Scott Wagner, R-York County, reacts Tuesday night as he's told that The Associated Press called the Republican race for governor in his favor.

Paul Kuehnel, York Daily Record

The Associated Press called the race for Wagner at about 10 p.m. ET.

Wagner, 62, of Spring Garden Township, ran against Paul Mango, a retired health care systems consultant, and Laura Ellsworth, an attorney, in the Republican primary for governor in Pennsylvania. The polls closed at 8 p.m.

Wagner announced in 2016 that he intended to run for governor.

He’s repeatedly emphasized his background in business, joking that he started at age 10 shoveling manure on his parents’ farm in York Township for $5 per week. He graduated from Dallastown Area High School in 1973 and spent one year at what was then Williamsport Area Community College, dropping out to pursue various business ventures.

In 1985, Wagner and two partners, including his uncle, Robert Kinsley, started York Waste Disposal. They decided to sell the business in 1997.

Then, in 2000, Wagner opened Penn Waste, a competing waste-hauling company, as soon as his non-compete agreement expired.

In 2014, Wagner ran for the state senate seat in the 28th District, which includes part of York County.

He accused the GOP bosses of plotting to make it more difficult for him to win. The Pennsylvania State Senate Campaign Committee criticized him as a “millionaire trash man” and backed his opponent.

It didn’t matter. Wagner became the first person to be elected via write-in to the state Senate. He received more than 10,000 votes.

When he got to Harrisburg, Wagner was instrumental in ousting then-Senate Majority Leader Dominic Pileggi, R-Delaware County, from his position. He’s been a vocal critic of public-sector unions and government spending. But he’s also thrown his support behind criminal justice reform measures as well as a bill that would’ve banned discrimination in employment and housing based on sexual orientation or gender identity.

Photos: Scott Wagner wins Republican nomination for governor

State Sen. Scott Wagner, R-York County, reacts Tuesday night as he's told that The Associated Press called the Republican race for governor in his favor.

01 / 19

State Sen. Scott Wagner, R-York County, reacts Tuesday night as he's told that The Associated Press called the Republican race for governor in his favor.

01 / 19

People have drawn comparisons between him and President Donald Trump, citing their backgrounds in business, brash personalities and personal lives that include multiple marriages. In fact, Wagner told abc27 that "Donald Trump is actually a mini-Scott Wagner."

During the campaign, Wagner vowed to put big government in the dumpster. He said he’d get rid of property taxes. He also touted a “100 percent pro-life voting record.”

The race got personal.

Mango unveiled an ad called “Faded Neon,” which featured a cartoon caricature of Wagner and accused him of being a sleazy bail bondsman, deadbeat father and greedy business owner.

Election Day is Nov. 6.

Contributing: The Associated Press

Primary voters head to the polls in four states

Voters drop off ballots on the day of Oregon's primary election at a drive by drop-off station in Portland, Ore. on May 15, 2018. In the second major May primary day nationwide, four states go to the polls: Idaho, Nebraska, Oregon, and Pennsylvania.

01 / 12

Voters drop off ballots on the day of Oregon's primary election at a drive by drop-off station in Portland, Ore. on May 15, 2018. In the second major May primary day nationwide, four states go to the polls: Idaho, Nebraska, Oregon, and Pennsylvania.