Democratic gubernatorial candidate Jay Gonzalez criticized Gov. Charlie Baker for his initial decision to send Massachusetts National Guard troops to the Mexican border in accordance with President Donald Trump’s “zero-tolerance” immigration policy to separate children from their families at the border.

“Right now we’ve got a governor who has been complicit, in my view, on this anti-immigrant, hateful, cruel, inhumane policies that Trump has been enforcing at the federal level,” Gonzalez said in an interview with Boston Public Radio Tuesday. “It’s a decision that never should have been made in the first place...it should be a gut reaction, and I don’t think he sees these things, honestly, as part of his job.”

The Baker administration announced in June that one Massachusetts National Guard helicopter, an aircrew and military analysts would head to the border at the end of the month.

Later that month, In an announcement originally reported by WGBH News, Baker canceled the deployment, citing “inhumane” treatment of children and families.

“Governor Baker directed the National Guard not to send any assets or personnel to the Southwest border today because the federal government’s current actions are resulting in the inhumane treatment of children,” Baker communications director Lizzy Guyton said in a statement sent to WGBH News.

Gonzalez told WGBH News he takes at least partial credit for Baker’s change of heart. It wasn’t until a lot of pressure from our campaign and a lot of others that Charlie Baker reversed his decision,” he said. “I was criticizing him from the day he made his decision, the day before he made his decision we put out a petition for people to sign, calling on him to change his decision, [and] within 24 hours almost 1,000 people signed it, and the next day, he reversed his decision.”

According to Gonzalez, the role of a Massachusetts governor is to oppose Trump administration policies that are “inconsistent with our values.”

“There are some issues and some things that are happening in the Trump administration that are so inconsistent with our values as a country,” he said, “and certainly here in Massachusetts, we need to stand up and we need to fight back.”