RICHMOND — A Circuit Court judge ordered state officials to remove independent presidential candidate Kanye West from the Virginia ballot Thursday, granting an emergency order sought by two voters who said they were duped into helping the rapper-entrepreneur qualify for the ballot.

Circuit Court Judge Joi Jeter Taylor made the ruling in a lawsuit filed this week by Matthan Wilson and Bryan Wright, who sued state elections officials for putting West on the ballot but faced their only opposition from West, whose attorney petitioned to intervene in the case.

West’s Roanoke-based attorney, Chris K. Kowalczuk, did not immediately respond to a request for comment after the ruling. Arguing against West’s removal in court, Kowalczuk invoked the social justice protests that have swept the nation all summer and noted at least twice that West is Black.

“For the court to remove an African American from the ballot at plaintiff’s request — if anything, this summer has taught us we all need to reexamine the way we look at how disparate treatment of a whole segment of our society for 350 years affects every aspect of our life, whether it’s the police department, whether it’s schools . . . whether it’s sports,” he said. “Today’s subject is elections.”

Justin Sheldon, who represented the two voters, asserted that West’s campaign had “secured the signatures to get on the ballot by fraud.” He warned that if West got away with the alleged dirty tricks, that would “create a blueprint for others” to do the same.

Time is running out for Virginia to make any changes to its presidential ballot. The state would have typically started printing ballots this week ahead of a Sept. 19 deadline to mail absentee ballots, which are in especially high demand this year because of the novel coronavirus pandemic.

West, who has been an outspoken supporter of President Trump, has been kicked off the ballot in several other states because of deficient paperwork. Democrats fear that he could act as a spoiler in swing states by drawing Black voters away from Trump’s rival, former vice president Joe Biden.

Virginia’s Board of Elections found last week that West had met the requirement for 5,000 petition signatures — at least 200 of them from each congressional district — and for 13 electors who pledged to support him.

But Taylor found that 11 of the oaths were “obtained by improper, fraudulent and/or misleading means, or are otherwise invalid” because of irregularities related to how they were notarized.

Wilson, one of the 13 electors, was the only witness to testify, appearing in court by way of Zoom. A high school government teacher who lives in Suffolk, he said that three people flagged him down while he was out on a bike ride and asked if he would like to serve in a statewide pool of electors. He said he learned from a reporter more than a week later that by signing the document, he’d actually pledged to serve as an elector for West.

“As a teacher, I assume you have a college degree, correct?” Kowalczuk asked on cross examination, suggesting that his educational background would have made it hard to deceive him.

The lawsuit, filed Tuesday, named state elections officials as defendants, saying they should not have certified West for the ballot last week. But Kowalczuk, who successfully petitioned to intervene in the case on behalf of West’s campaign, made the only arguments against removal.

The office of Attorney General Mark R. Herring (D), which typically defends state agencies and boards in court, sent a representative but did not weigh in on the substance of the case. Heather Hays Lockerman, the senior assistant attorney general sent to represent the state, only urged the judge to move quickly because of the need to print and mail absentee ballots.

“We need to know today, tomorrow at the absolute latest,” she said.