A former Brookfield Board of Education member is asking a federal judge to overturn a loyalty test imposed by the town’s Republican leaders that bars her from voting in the GOP’s April 26 presidential primary.

Citing an obscure state statute, the town’s Republican registrar and the head of the Brookfield Republican Town Committee last year removed Jane Miller from the party’s rolls and over her objections and declared her an unaffiliated voter.

They said she’d lost the right to be a Republican because she ran on the Democratic municipal slate in 2013 after her party refused to endorse her for another term on the school board.

“I just could not believe it,” Miller said in a prepared statement from her attorney. “I would never think that my rights could be taken away from me so arbitrarily.”

“I felt so powerless,” Miller said.

Brookfield Republican Registrar Thomas Dunkerton removed Miller from the GOP’s rank-and-file list after consulting with the party’s town chairman, Matthew Grimes. To comply with a state law that requires a registrar and a party chairman to team up on issues of party loyalty, they first held a hearing to determine if she toed the party line and then decided to boot her out.

Former Secretary of State Susan Bysiewicz, who is representing Miller in court, said that in her 12 years overseeing Connecticut elections, she never came across a registrar using the party loyalty provision to strip someone from party rolls.

She said that axing Miller was “clearly discriminatory and vindictive” and “not what voters elect these officials to do.”

Bysiewicz, a partner at the Stamford-based firm of Pastore & Dailey LLC, is seeking to restore Miller’s right to vote as a Republican as well as $1 million or more from Dunkerton, Grimes and two other town Republican officials for violating Miller’s civil rights.

According to the complaint filed this week in federal district court, the men should be penalized for “conspiring to, and taking actions that deprived her of her Constitutional rights to vote and freely associate.”

A state court last summer ruled in favor of Dunkerton. The judge determined that the registrar had acted properly within the provisions of the law, which is meant to prevent people from registering with a political party under false pretenses.

In that case, Dunkerton’s attorney argued that Miller had chosen to leave the Republican Party in order to run as part of a Democratic slate for the local school board, a move that necessarily required any voters she attracted to cast a ballot against one of the GOP’s standard bearers.

Attorney Neil Marcus of Danbury wrote in legal papers filed last summer for Dunkerton that the loyalty test “simply provides town parties with an internal process to assess whether a member’s conduct is so outwardly disloyal that the party may affirm its associational rights and take steps to protect itself and other members.”

In her federal lawsuit, Miller pointed out that two other former Republicans, both men, had run for office on the Democratic slate in 2015 but had been allowed to rejoin the GOP after the election. She alleged that sex discrimination was also an element of the decision to oust her from the party.

The federal lawsuit seeks damages of $1 million or more for violating her constitutional rights and causes her “pain and suffering, emotional distress, loss of dignity, loss of reputation and damage” to Miller’s business.