Gearing up for a re-election campaign during a presidential race badly shaken up by Donald Trump, U.S. Sen. Pat Toomey appeared in Philadelphia Monday to voice his opposition to the sanctuary city policies Mayor Jim Kenney has championed.

While that stance lines up with Trump’s rhetoric, Toomey has not endorsed the presumptive GOP nominee, and authored a Philadelphia Inquirer op-ed Sunday calling him “not my first, second, or third choice.” He also criticized the business tycoon and reality TV host, writing that his “vulgarity, particularly towards women, is appalling.”

But Toomey struck a somewhat more conciliatory tone at Monday’s news conference, noting that he agreed with Trump in certain areas — specifically repealing Obamacare and “simplifying” the tax code.

“He's got a lot of work to do to unite the Republican Party and win the presidential election,” Toomey said.

RELATED: State rep.: I was 'ambushed' by immigration activists

The op-ed came as the campaign of Toomey’s opponent, Democrat Kate McGinty, a former state director of environmental protection, has begun trying to associate him, in voter's minds, with Donald Trump — referring to his campaign as the “Trump-Toomey” ticket.

Regardless of whether Toomey sees differences between Trump and himself, he was in town to pitch his bill to cut off some federal funding to sanctuary cities like Philadelphia. Trump has also been intensely critical of sanctuary city policies, and his stark stances on immigration — including a temporary ban of all new Muslims — have polled well among Republican voters. 

“Philadelphia has one of the most extreme sanctuary city policies in America,” Toomey said.

Toomey called the policy an example of “politicians in a misguided way overriding the judgment of the law enforcement community.” 

“I do believe that the vast majority of Philadelphia police officers believe Philadelphia should not be a sanctuary city,” Toomey said. He said that opinion is based on “numerous conversations” with members of law enforcement.

RELATED: State rep defends anti-sanctuary city bill against accusation of 'hate'

Toomey’s words came just days after Kenney met with Department of Homeland Security Secretary Jeh Johnson, who personally asked Kenney to reinstate limited police cooperation with federal immigration authorities. Kenney refused.

Former Mayor Michael Nutter originally instituted Philly’s sanctuary city policy, meaning local police are directed to not alert federal Immigrations & Customs Enforcement (ICE) when an illegal immigrant is arrested, and to not follow “detainer holds” from ICE requesting individuals be held in detention.

Nutter changed the policy just before leaving office to match new ICE guidelines, allowing cooperation involving individuals convicted of violent crimes or suspected of gang involvement or terrorism activity, a move that prompted criticism from immigrant advocacy groups. Kenney undid that change on his first day in office.

“Mayor Kenney refused to modify Philadelphia’s sanctuary city status even just to that very modest degree,” Toomey said.

Toomey was joined by state Rep. Martina White, a Republican who represents parts of Northeast Philly and has taken intense flack for her legislation to end the city’s sanctuary city status. Her bill would also make the city “liable” for any crimes or damages committed by illegal immigrants.

“I believe the safety of American citizens should be our number-one priority,” White said. “It is just too dangerous to allow this policy to continue.”

New Sanctuary Movement (NSM), an immigrant advocacy group that has argued sanctuary city policies make Philly safer by encouraging undocumented residents to contact and cooperate with local police, decried Toomey’s statements.

“If Philadelphia stops being a sanctuary city, we will not feel safe to leave our homes, or to live a normal life,” said Estela Hernandez, an undocumented mother, Catholic and NSM leader, in a statement on Monday. “We will be very afraid. If Senator Toomey is Catholic, he should give people a second chance.  He should put himself in our shoes, to understand our sufferings, and should know we love our kids the same as he loves his kids.”

But Toomey cited the death of San Francisco woman Kate Steinle, who was killed by an illegal immigrant who had previously been arrested and released by San Francisco police under that city’s sanctuary city status, as an example of the dangers of the policy.

He also mentioned the case of Alberto Suarez, an illegal immigrant who allegedly grabbed a woman off the street at 8th and Race streets in 2010 and raped her against the wall of a nearby SEPTA station. Suarez is also charged with previously raping a Montgomery County teenager, and a Pittsburgh woman. The FBI tracked Suarez down in Mexico, where he was arrested in 2014.

Toomey said the sanctuary city policy meant in Philadelphia someone like Suarez, or someone suspected of links to terrorism, would essentially be protected from immigration authorities.

“Philadelphia’s response is, ‘No thanks, we’ll release him, come back after he’s committed a crime,’” Toomey said. “It’s just too dangerous.”