President Trump took a veiled shot at New York Gov. Andrew Cuomo on Monday, suggesting his career is over after the Democratic governor remarked that America was “never that great.”

“Any politician who puts criminal aliens before American citizens should find a new line of work, because it's not going to work, not going to work,” Trump said during an event honoring immigration officials. “And any politicians that get up and say our country was never great, you heard that. I think that’s the end of that career.”

[Opinion: Andrew Cuomo doesn't see America's greatness because he doesn't know where to look]

Trump delivered remarks during a White House event saluting agents with Immigration and Customs Enforcement and Customs and Border Protection.

Cuomo, who is running against actress Cynthia Nixon in the Democratic gubernatorial primary election in New York, took a shot at Trump’s “Make America great again” slogan during a bill signing last week.

“We’re not going to make America great again,” Cuomo said. “It was never that great.”