Detroit — Democrat Gretchen Whitmer will be Michigan’s 49th governor and end eight years of total Republican rule in state government after defeating Republican attorney general Bill Schuette in Tuesday's high-stakes mid-term election.

The Associated Press declared the race for Whitmer at about 10 p.m., projecting her as the winner of the combative race to replace term-limited Gov. Rick Snyder, a Republican who will leave office at the end of the year.

“We may have all gone to the polls for very different reasons, but today we as Michiganders came out because we all loved this state and because we want a Michigan that works for every one of us,” Whitmer said in her victory speech. “No matter where you were born, how much money’s in your pocket, what you look like, who you worship, or who you love.”

Whitmer, who ran on a pledge to “fix the damn roads” and protect expanded Medicaid coverage for lower-income residents, was leading Schuette 53 percent to 44 percent with 80 percent of precincts across the state reporting results.

Where did Gretchen Whitmer win in Michigan? An interactive map

"I guess we're going to have to fix the damn roads now, right?" she told supporters at who celebrated at the MotorCity Casino Sounboard in Detroit.

Whitmer will be Michigan’s second female governor. Her running mate, 35-year-old Garlin Gilchrist II of Detroit, will be the state’s first African-American lieutenant governor.

Live election results: Track the latest numbers in governor’s race and more

Schuette called his rival to concede before publicly acknowledging defeat around 10:30 p.m., thanking his family and running mate Lisa Posthumus Lyons.

The Midland Republican told the crowd he was honored to be the GOP nominee and that he ran so Michigan could be the best state in the nation, “nothing less.”

“My mom used to say you're judged by the company you keep," Schuette said at a GOP gathering in Lansing. "I have so many wonderful friends in this room.”

Libertarian Bill Gelineau, Jennifer Kurland of the Green Party, Todd Schleiger of the U.S. Taxpayers Party and Keith Butkovich of the Natural Law Party each had less than 1 percent of the vote.

Whitmer, 47, rose to prominence as the liberal voice in the state Legislature, where she served in the political minority her entire 14-year-tenure before a six-month stint as interim Ingham County prosecutor. But as a candidate for governor, she touted her ability to solve problems and work across the aisle.

The East Lansing Democrat had the political winds at her back. President Donald Trump's shadow loomed large over the mid-term election, which are traditionally difficult for the party that controls the White House. At the state level, Michigan voters have not replaced a term-limited governor with a candidate from the same party since adopting those limits in 1992.

Whitmer's ability to accomplish campaign goals could depend on the make-up of the state Legislature, which remained unclear late Tuesday as Democrats attempted to chip away at Republican majorities in the Michigan House and Senate.

Pointing to her campaign logo that was inspired by the Mackinac Bridge, Whitmer said the iconic suspension bridge that connects Michigan's peninsulas was built at a time of divided government.

"At a time when we see too many people trying to divide us through walls, I think we in Michigan need to get back to building bridges," she said.

Whitmer voted Tuesday morning at St. Paul Lutheran Church in East Lansing. She wore a shirt with the word “vote” spelled out vertically, the middle letters forming the Venus symbol for female, and was joined by her teenage daughters.

“We’ve been voting together since they were born, because I want them never to take this for granted, this right and this important duty,” she said of 15-year-old Sydney and 16-year-old Sherry.

Schuette voted in his hometown of Midland, where he was joined by his wife Cynthia, daughter Heidi and son Bill.

Democrats gathered at MotorCity watched results trickle in on CNN and were on their feet throughout the night as Martha and the Vandellas' “Dancing in the Street” and other Motown hits blared over the loud speaker.

“I am so excited about what the state of Michigan is doing right now," Gilchrist said after the race was called. "I am so proud to humbly accept the opportunity to serve as your next lieutenant governor.”

Republican supporters who gathered at the Lansing Center expected a tight finish in many of the statewide races and were steeling themselves for a long night ahead.

As results began to come in, the Michigan GOP was keeping a close watch on results in Macomb, Livingston, Ottawa and Kent counties, said Tony Zammit, deputy communications director for the Michigan Republican Party.

“We think we’ve made significant inroads there in the last few years,” Zammit said.

Schuette was endorsed by Republican President Donald Trump, who did not visit Michigan in the run-up to the mid-term election. But both Vice President Mike Pence and White House counselor Kellyanne Conway campaign for Schuette and other Republicans in recent weeks.

Whitmer benefited from campaign stops by a who’s who of Democratic surrogates, including former President Barack Obama, former Vice President Joe Biden and U.S. Sen. Bernie Sanders of Vermont, an independent who won Michigan’s presidential primary in 2016.

Dana Ziegler, 29, a legal aid attorney who lives in Novi, voted for Whitmer, calling her a leaders who has a proven ability to work across the aisle.

“She’s done so much for Michigan, especially when she was in the Legislature and expanding Medicaid,” said Ziegler. “She’s really good at building coalitions and I’m confident she’ll be able to do the same thing as governor.”

John Anthony Williams, 57, of Romulus said he voted for Whitmer in part because of her focus on the quality of life in Michigan.

She talked about “everything I want taken care of in my life,” Williams said. “Lower car insurance rates. Health insurance. Clean water. She talked about it all.”

Crystal Williams, 49, of Detroit, voted for Whitmer and Gilchrist.

“We’re looking for a change and we need it separately here in Michigan,” said Williams, a schoolteacher. “It’s just time for a change and we’ll let them work their magic or whatever they have to do to take care of business.”

Williams added it's time for something different and that Whitmer and Gilchrist are “for the working people.”

“It’s just time for us to be recognized without being looked over,” she said.

Suzie Lewis of Howell, 60, said she voted for all Republicans this year. In picking Schuette over Whitmer, Lews said “I just remember Granholm,” referencing former Gov. Jennifer Granholm, a Democrat who left office at the end of 2010.

“I sell real estate, and we need a healthy, strong economy,” she said. “We’re seeming to get there. I don’t want to go backward.”

Whitmer was the first high-profile candidate in the race — and the last standing. The former state Senate minority leader officially launched her campaign in January 2017. Her early entry discouraged several other well-known Democrats from joining the fray, and she topped her nearest rival in the August primary by more than 21 percentage points.

Whitmer modeled her aggressive pledge to "fix the damn roads" on motorists angry about paying what she called a hidden tax to fix broken rims and other vehicle damage caused by Michigan’s aging infrastructure. She plans to ask lawmakers to consider new user fees, which could include higher gas taxes, or ask voters to approve bonds for up to $2 billion a year in new spending through a state infrastructure bank.

Schuette also vowed to fix the roads but did not propose any new funding source, vowing to reprioritize the state budget rather than raise taxes. Experts questioned his ability to do so while pushing through a proposed personal income tax cut that could cost the state $1 billion a year in revenue.

Both candidates said they would attempt to repeal the “pension tax” on retirement income. Snyder and the GOP-led Legislature phased out a longstanding income tax exemption as part of the 2011 tax code overhaul.

While she criticized Snyder’s handling of the Flint water contamination crisis and said it motivated her own decision to run, Whitmer repeatedly touted her work with the governor to secure Senate votes to expand Medicaid under the Affordable Care Act while vowing the protect the Healthy Michigan plan that now provides health insurance to more than 675,000 lower-income residents.

Schuette, 65, served the past eight years as state attorney general, his latest post in a long political career that began with election to the U.S. House in 1984. The Midland Republican brought vast experience to the gubernatorial race, having served in the executive, judicial and legislative branches of state government.

He built his campaign around a “paycheck agenda” that included plans to cut the state’s personal income tax rate from 4.25 percent to 3.9 percent, ending a 2007 hike that was supposed to be temporary but was frozen in 2011 by Snyder and the GOP-led Legislature as part of a tax code overhaul that slashed business taxes.

Schuette championed himself as the best candidate to continue economic gains made under Republican leaders like Snyder, who refused to endorse in the race as the attorney general prosecuted two administration officials over legionnaires’ disease deaths linked to the Flint water contamination crisis. Snyder backed Lt. Gov. Brian Calley in a bruising primary fight that Schuette easily won by 25 points.

Snyder touted Michigan's economic comeback as congratulated Whitmer late Tuesday, vowing to work with her and her team to ensure a smooth transition.

“Governor-elect Whitmer’s success means Michigan’s success," he said in a statement. "I urge all Michiganders to join me in committing to a spirit of civility, unity, collaboration, and teamwork to ensure Michigan continues on the right path toward our promising future.”

Whitmer and her allies outspent Schuette in the final weeks of the campaign, which that featured a cacophony of television attack ads from both sides. After loaning his campaign $325,000 in late October, Schuette canceled planned ad buys in most markets outside of Metro Detroit while the Michigan Republican Party continued to air ads on his behalf.

Whitmer raised more than $4 million and spent more than $4.5 million between Aug. 28 and Oct. 21 and had reported roughly $11.1 million in private contributions by that point in the cycle. Schuette raised $2.4 million and spent $2.8 over the same stretch, according to disclosure reports, and had raised roughly $9 million in private month through Oct. 21.

Schuette never led a public opinion poll of the gubernatorial race but had called himself the “comeback kid” and predicted a narrow victory. Whitmer led by 12 percentage points in an Oct. 25-27 survey of 600 likely voters conducted for The Detroit News and WDIV.

joosting@detroitnews.com

Staff reporter Sarah Rahal contributed