Gov. Andrew Cuomo took several shots at President Donald Trump Thursday as he signed a new bill strengthening New York’s labor unions.

The law ensures that both public and private unions give their paying members all the benefits and services to which they are entitled as soon as they are hired by their organization. The law comes on the heels of the pending Supreme Court case Janus v. AFSCME, which could change the way unions collect fees — and ultimately their budgets.

Speaking to a room of the city’s top unions, including the United Federation of Teachers, Cuomo said the case is another example of a nationwide conservative movement to dismantle union powers.

“The pattern is clear. They are coming at the union movement piece by piece,” he said.

The law requires public employees to notify their respective unions that they’ve been hired to their position and meet with them within 30 days to sign up for membership. It also mandates that the union protects a member’s benefits if they take leave, and gives their members the option of paying their dues electronically.

Cuomo, who is running for re-election this fall, argued that Trump’s tactics — such as appointing members to the NLRB who have expressed anti-union sentiments — are cause for concern. He made several jabs about Trump’s sexual harassment allegations and tax cut plans, and predicted that states across the country will follow suit in countering the president’s policies.

“We’re now going to stand up and fight back — and fight back like we never did before,” he said.