Rep. Marsha Blackburn (R-TN) was elected to the U.S. Senate on Tuesday, defeating former Tennessee Gov. Phil Bredesen (D) in an unusual race pitting an ardent supporter of President Donald Trump against a conservative Democrat.

Democrats believed that a win in Tennessee would nearly guarantee them a majority in the Senate, causing both candidates to raise the stakes of the final outcome. But Trump’s popularity in the Volunteer State was key to Blackburn’s victory. The reliably conservative state hasn’t elected a Democrat to the Senate since 1990.

Blackburn, who has served eight terms in the U.S. House of Representatives, ran as a Trump loyalist and pledged to support the president’s agenda, particularly on immigration. In the final days of the campaign, she took cues from Trump’s efforts to gin up fear among the conservative base about the migrant caravan making its way to the U.S. from Central America. Blackburn called the group an “illegal alien mob” and attacked Bredesen for dismissing the caravan as a non-threat.

But Blackburn also framed the race as more than just a battle between her and Bredesen. In an effort to ensure that Republicans turned out to the polls for her, Blackburn made the case that voting for Bredesen meant handing the Senate over to Chuck Schumer (D-NY). In the Senate, Blackburn will be a reliable vote in favor of Trump’s priorities.

She will succeed retiring Sen. Bob Corker (R-TN), a former Trump supporter who has feuded with the president and has called out his party’s “cult-like” support for Trump. Corker donated to Blackburn’s campaign but was largely absent from the campaign trail because he pledged to not campaign against Bredesen, whom he considers a close friend. Blackburn will be the first woman to serve as a Tennessee senator.

Bredesen, a popular former two-term governor, won the support of many prominent Republicans in the state for his fiscally conservative record, which included balancing the state’s budget and making cuts to TennCare, its Medicaid program. Bredesen also said he would have supported Brett Kavanaugh’s Supreme Court nomination if he were voting on it, and he has repudiated his party for embracing liberal policy positions on health care and immigration, branding the national Democratic party as out of touch with middle America.

But those overtures—some of which could have hurt Bredesen among progressives—weren’t enough in a state that Trump won by 26 points. The president visited Chattanooga to boost Blackburn two days before the election.