DENVER (AP) — An effort to block Republican President-elect Donald Trump led to a rowdy Electoral College vote Monday in Democratic Colorado, where left-leaning activists thronged a public foyer and shouted at nine electors.

The ruckus led to a last-minute court order and the removal of one elector, who took an oath to support the winner of the popular vote here, Democrat Hillary Clinton.

Moments after swearing he’d support Clinton, 24-year-old Micheal Baca of Denver filled out a ballot for Republican Ohio Gov. John Kasich. It was a gambit to try to block Trump from receiving the 270 electoral votes needed to win the White House.

Baca, who wore a yellow T-shirt touting Democratic Vermont Sen. Bernie Sanders and the slogan “Enough Is Enough” sat quietly as Colorado Secretary of State Wayne Williams called for his replacement by another elector.

Baca had earlier objected to the oath’s language requiring him to support Clinton, though a last-minute legal challenge to the oath failed and a state judge affirmed the oath was legal.

Alternate elector Celeste Landry of Boulder was then sworn in and cast her ballot for Clinton, meaning the Democrat won all nine electoral votes from Colorado.

Throughout the public proceedings, about 200 protesters shouted anti-Trump slogans and urged the electors, “Vote your conscience!” Some shouted for Williams to resign. The secretary of state, a Republican, gave no response.

Baca, a first-time elector, could face perjury charges for pledging to support Clinton but then not voting for her. Williams said that decision would be made later by a prosecutor, and Baca left the Capitol on his own. Baca got handshakes and back-slaps from anti-Trump demonstrators who crowded the halls.

Baca was among a small faction of electors trying to persuade Republican electors to choose Kasich or another Republican in an effort to throw the presidential election to the U.S. House, something all conceded was a long shot.

“We’ll see what happens at the end of the day,” Baca said after the vote, even as it became even less likely that Trump would not prevail.

Trump won 306 electoral votes to Clinton’s 232 in the Nov. 8 election.