WASHINGTON — A federal judge on Thursday dismissed Alabama Chief Justice Roy Moore's federal lawsuit against his state's Judicial Inquiry Commission, which has ethics charges pending against him.

While the charges — relating to actions Moore took to fight same-sex couples' marriage rights in the state — are pending, Moore is not allowed to sit on the state's Supreme Court under the state's Constitution.

Moore then filed the federal lawsuit in May asking to be reinstated to the court, alleging the constitutional provision violated his federal civil rights.

U.S. District Court Judge W. Harold Albritton III dismissed Moore's case on Thursday, finding it appropriate for the federal court to abstain from hearing it while the state proceedings are ongoing because Moore's federal case, if resolved in his favor, "would interfere with ongoing state proceedings."

Moore faces removal from the bench if the Alabama Court of the Judiciary rules against Moore in response to the commission's charges.

The six charges against Moore are the result of an administrative order Moore issued on Jan. 6 in his capacity as the head of the state's courts. The order purported to tell probate judges in the state that they remained subject to an earlier state court order that they uphold the state's ban on same-sex couples’ marriages — despite the U.S. Supreme Court's June 2015 ruling in Obergefell v. Hodges that declared such bans to be unconstitutional and a subsequent federal court order that applied specifically to Alabama's ban and its probate judges.

"In issuing his Administrative Order of January 6, 2016, Chief Justice Moore flagrantly disregarded and abused his authority as the chief administrative office of Alabama's judicial branch in substituting his individual opinion for that of the Court," the commission wrote.

Earlier this week, the Montgomery Advertiser reported that the hearing on the case is scheduled for Sept. 28. That hearing, however, only will go forward if the Court of the Judiciary first rules against Moore's request that the case against him be dismissed. A hearing on that request is set for Aug. 8.

In a statement, Moore's lawyer in the case, Liberty Counsel's Mat Staver, said they are considering whether to appeal Thursday's ruling.

"We will discuss the matter with our client about appealing the ruling," Staver said. "We are ready for Monday’s hearing to address the politically-motivated charges filed against Chief Justice Moore."