RALEIGH, N.C. -- A judge has ruled party affiliations must appear beside a judicial candidate’s name this fall. 

The hearing comes after a State Supreme Court candidate filed a lawsuit against Republican lawmakers.

During the special session that ended just last week, lawmakers passed a law saying judicial candidates must be affiliated with the party they are running for at least 90 days prior to filing. 

State Supreme Court candidate Chris Anglin filed a lawsuit claiming the law was unfair. 

Anglin switched his party from Democrat to Republican shortly before filing to run for a State Supreme Court seat. 

Three other candidates are also affected by this law and one has also filed a lawsuit.

Republicans accused Anglin of trying to split the GOP vote with incumbent Justice Barbara Jackson to help Democratic opponent Anita Earls win.