Republicans on Tuesday blasted Ohio Gov. John Kasich (R) for not voting for GOP presidential nominee Donald Trump and accused him of disloyalty to the party.

Republican National Committee spokesman Sean Spicer told CNN that Kasich’s decision “is not going to look good for the Kasich legacy,” and said he was “making light of” the election.

“A vote for anything but Donald Trump is a de facto vote for Hillary Clinton,” Spicer said. “It’s a vote for liberal judges, for more corruption, for more scandal.”

.@seanspicer on John Kasich voting for McCain, not Trump : "It's not going to look good for the Kasich legacy" https://t.co/Ylb48erqxR — OutFrontCNN (@OutFrontCNN) November 1, 2016

Spicer argued that Kasich’s failure to support Trump could hurt the GOP nominee’s chance of winning in Ohio.

Kasich, a 2016 Republican presidential contender who had vowed not to vote for Trump, wrote in the name of 2008 GOP nominee Sen. John McCain (R-Ariz.) on his absentee ballot, Kasich’s spokesman said Monday.

Kasich, who ended his bid for president in May, had long been reluctant to support Trump, saying it was “something that’s a matter of conscience for me.” Throughout the summer, he criticized Trump’s demeanor and rhetoric, and chose not to attend the Republican National Convention, held in his own state.

Last month, after the release of a 2005 video that showed Trump bragging about sexual assault, Kasich announced he wouldn’t vote for someone who “has behaved in a manner that reflects so poorly on our country.”

Carlo Allegri / Reuters

Other Republicans also criticized Kasich on Tuesday, accusing him of breaking the party’s pledge for former presidential rivals to support the nominee.

“If you’re watching, John, you signed a pledge. You signed a pledge saying that you would support the Republican nominee for president,” former Sen. Rick Santorum (R-Pa.), a Trump supporter, told CNN. “You can’t say a man who’s not going to keep his word is someone that, frankly, should be paid attention to when it comes to how he’s going to vote. John, you are better than that.”

But others said Kasich’s steadfast opposition to Trump was the right thing to do, especially if Kasich hopes to mount another presidential bid, should Trump lose.

Ohio Democratic Party Chair David Pepper fired back at Spicer on Tuesday, saying on Twitter that Kasich “stuck to principle when most others withered in a partisan corner.”

UPDATE: 10:53 p.m. ― John Weaver, Kasich’s top adviser, suggested on Twitter that Spicer should be more worried about the RNC’s legacy than Kasich’s.

Editor’s note: Donald Trump regularly incites political violence and is a serial liar, rampant xenophobe, racist, misogynist and birther who has repeatedly pledged to ban all Muslims — 1.6 billion members of an entire religion — from entering the U.S.