A presidential elector from Maine announced Monday that he planned to cast his vote for Sen. Bernie Sanders (I-VT), despite Hillary Clinton winning the state’s popular vote.

But David Bright was told his vote for Sanders was improper and ultimately ended up casting a ballot for Clinton.

“I am not a Clinton elector, I am a Democratic elector. I do not represent Democrats all over the country, I represent the Democrats in Maine,” Bright wrote in a Facebook post.

According to Maine law, Bright was required to vote for Hillary Clinton when the state’s electors cast their votes Monday. Instead, he wrote that he planned on casting his vote for Sanders “not out of spite, or malice, or anger, or as an act of civil disobedience,” but rather “to represent thousands of Democratic Maine voters – many less than a third my age – who came into Maine politics for the first time this year because of Bernie Sanders.”

However, the Portland Press Herald reported that Bright seemed to have changed his mind after his initial vote was declared out of order. On the second ballot, the vote split according to expectations: Three for Hillary Clinton, one for Donald Trump.

Maine and Nebraska are the only two states that do not apportion their electoral votes on an all-or-nothing basis. Clinton won the state by a 22,142 vote margin, according to the Cook Political Report, leaving her with three of its four electors—or, at least, that was the assumption.

Maine is also one of 30 states nationwide that requires presidential electors to vote according to how they are assigned. Bright acknowledged as much in an interview with the Portland Press Herald, but had initially said that wouldn’t stop him.

“Maine also has a law that you’re not supposed to go faster than 70 on the interstate,” he said. “I suspect that I’m going to break that law on my trip to Augusta this morning, too.”

Democratic primary voters in Maine chose Sanders by a margin of nearly two-to-one over Clinton when the state held its caucuses in March.

Read Bright’s statement below:

This post has been updated.