KANSAS CITY, Kansas — The new face of an emerging democratic socialist movement joined its patriarch in the most unlikely place Friday, calling on Kansans unhappy with the direction of the country to get off the sidelines in a pivotal Republican-held congressional district.

“We know that people in Kansas, just like everywhere else in this country, just like families in the Bronx, just want a fair shake,” Alexandria Ocasio-Cortez, the surprise winner in a New York House primary last month, told a frenetic crowd of more than 3,000 in a Kansas suburb of Kansas City.

Headlining a rally with Vermont Sen. Bernie Sanders, Ocasio-Cortez sought to infuse the final weeks of Democrat Brent Welder’s congressional primary campaign with the enthusiasm that lifted her over 20-year Democratic incumbent Rep. Joe Crowley last month.

In an election year defined by energized Democratic voters seeking to send President Donald Trump a message, Sanders and Ocasio-Cortez were betting they could stir up liberals in places where the left rarely competes.

The 28-year-old Latina from New York and the 76-year-old Jewish senator from Vermont struck a stark contrast in the hotel ballroom, though they reflected the range of people in the racially and ethnically mixed crowd, weighted toward millennials but including gray-haired activists and parents with children.

Their combined messages sought to unite not just the diverse group in the hall, but restless liberals around the country.

“Whether you live in Kansas or Vermont or New York City, you want your children to have a decent life,” Sanders said. “And yes, we have differences. But despite these huge differences, we have a hell of a lot more in common.”

Kansas, where Trump won by more than 20 percentage points in 2016, would seem inhospitable for a duo championing strikingly progressive positions such as universal, single-payer health care and government-paid tuition to public college.

But Democrats see reasons for hope in a campaign year in which progressive candidates have won competitive primaries in GOP-leaning districts in suburban Philadelphia, metropolitan Omaha and Orange County, California, this year.

“I wasn’t sure when I’d have the chance to vote for someone this liberal in Kansas,” Burroughs said, referring to Welder, a Sanders campaign activist and labor lawyer.

Kansas’ 3rd District, where Welder is competing, represented by four-term Republican Rep. Kevin Yoder, is on Democrats’ target list as they aim to seize the GOP-controlled House in November. Nationally, the party must pick up at least 23 Republican-held seats to claim the House majority, and they are focusing on 25 districts where Clinton won, or Trump won narrowly.

Democrats have been shut out of statewide and congressional races in Kansas since 2010.

Earlier Friday, Ocasio-Cortez and Sanders headlined a rally in Wichita for Democrat James Thompson, a civil rights lawyer running in Kansas’ 4th District. He also was an activist for Sanders’ 2016 presidential campaign.

Sherri Lower, a 67-year-old retired emergency medical technician, showed up at the Wichita rally wearing a t-shirt that read: “We Care. We Vote. Do You?”

“This is the most important year we’ve ever had, and Thompson is one of our main guys,” Lower said. “I want Democrats to go out and vote.”

But Democrats have higher hopes in the 3rd District, one of only a handful Democrat Hillary Clinton won in the general election and Sanders won in the presidential nominating caucuses.

Republicans in the 3rd District outnumber their Democratic counterparts by more than 50,000, while unaffiliated voters also edge Democrats. Republicans outnumber Democrats by 2-to-1 in the 4th District.

Liberals argue that they are not just convincing moderate Democrats or disaffected Republicans but also engaging new primary voters, as Ocasio-Cortez did in New York this summer and as Sanders did in his insurgent 2016 presidential campaign.

While the Kansas campaign swing created a lot of buzz, Republicans were skeptical it would help Democrats make inroads in a conservative state.

State Rep. Tom Cox, a moderate Kansas City-area Republican, said there are pockets of liberal Democrats in the Kansas City suburbs but questioned whether Sanders’ message will resonate more broadly. He said Democrats tend to be split between liberals and moderates, with some union members and supporters holding conservative views on social issues.

“Even our Democrats around here are not socialist democrats,” he said. “If someone would describe the 3rd District, I would say center right.”

Leading candidates in the Democratic primary for governor have said their party must rebuild its brand in rural, heavily GOP areas. And despite surging energy among lefist Democrats in the Trump era, it was unclear if there were enough votes in the 3rd District for a liberal Democrat to win.

Before Yoder won in 2010, it had been held for 12 years by centrist Democrat Dennis Moore, who relied on moderate Republicans during his tenure.

Yet Sanders and his brand of liberalism have proved popular. He won more than two-thirds of the votes in the state’s 2016 presidential caucuses, surpassing Barack Obama’s 2008 vote total.

And Ocasio-Cortez said it can be done in Kansas by broadening the electorate to include previously less active voters, rather than trying to convert moderates.

“It is going to take every single person in this room knocking on 10, 50, 100 doors apiece,” she said. “So, if you have never knocked on a door before, I am talking to you.”