Democrat Max Rose scored a stunning upset over U.S. Rep. Dan Donovan, unseating the only Republican member of New York City's congressional delegation.

Rose is an Army veteran who was wounded in Afghanistan in 2013, and he beat the odds in defeating Donovan in a district that covers Staten Island and a small part of Brooklyn.

New York's 11th Congressional District was Trump Country in the last national election.

Unlike other Democratic candidates in liberal New York, Rose didn't make President Donald Trump's leadership a central issue of his campaign, instead focusing on nonpartisan issues like fixing national infrastructure and fighting the opioid addiction epidemic.

Donovan was Staten Island's district attorney before being elected to Congress in 2015 in a special election. He was re-elected for a full term in 2016.

It is a Republican district Democrats were hoping would get caught up in a so-called blue wave, which took place in the House with less encouraging results in the Senate.

The seat was vacated by Rep. Michael Grimm when he was sent to prison for tax evasion, and Donovan was defending it by touting his limited support for Trump and noting he voted against Republican tax reform.

But Rose was banking on turning out voters who don't always show up, those who may have been eager to send a message to the president.

"I think it's crucial, there's a lot going on with the politicians right now and I feel like we could use a Democrat at this point," one voter said.

Other voters cited Donovan's long ties to Staten Island as a former prosecutor.

"Integrity, he's a family man, which means a lot to me," another voter said. "He's been serving the community for many years, 20, 30 years, and that means a lot to me."

And as a migrant caravan heads towards the U.S. border, the issue of immigration came front and center in the race.

A Donovan online ad claims sanctuary cities protect violent gangs, but the Rose campaign said Donovan voted to protect New York City's status as a sanctuary city and even released an old TV clip.

"Right before I left, I voted no on punishment for sanctuary cities," Donovan said in the clip. "New York is a sanctuary city."

Donovan denied changing positions.

"It's not a flip flop at all," he said. "I've always been opposed to sanctuary cities."

Donovan said he refused to approve a bill that would have punished police, but he says that does not translate into support for sanctuary cities.

"You don't come to this district here to run for congress and expect the people of Staten Island and South Brooklyn to accept you," he said. "And obviously (Rose's) support for sanctuary cities shows he's out of sync with our community."

The 11th Congressional District is considered the city's most conservative. The district voted for Barack Obama twice, but in 2016, it flipped and voted for Donald Trump 54 percent to 44 percent. In this year's midterm race, it lists the 11th as leaning Republican.

Rose ran as an outsider on a message that Washington has to change.

"People want leadership," he said. "They want someone and demand that someone is state government, the city government, the non-profit sector, the private sector and, yes, the federal government sit around a table and solve the damn problem...That should not be too hard."