Sen. Charles W. Carrico Sr. (R-Grayson), left, and Sen. Adam P. Ebbin (D-Alexandria) confer on the floor of the Virginia Senate. (Bob Brown/AP)

Virginia legislators on Friday decided to take a closer look at a bill to make sure that it would not let court clerks deny marriage licenses to interracial couples.

The measure, which passed out of a committee to the full Senate this week, was intended to protect clerks who object to issuing licenses to same-sex couples, something the bill’s Republican sponsor promoted as a matter of religious freedom.

But the legislation provided such wide latitude to refuse licenses that Sen. Charles W. Carrico Sr. (R-Grayson) initially said that it would cover clerks who objected to marriages on any grounds, including those based on objections to interracial marriage.

He later said he did not think it would apply in such cases because race is a “protected class” under anti-discrimination laws. But on Friday, he asked to have his bill sent back to the Senate Courts of Justice Committee for further study.

“I know that we say and do some things after long days here,” he said. “I made the mistake of saying something, and we want to make sure and have the clerks review this and the constitutionality. It was never intended for anything of that nature to violate anything of a protected class.”

The bill would give clerks or deputy clerks the freedom to refuse to issue licenses to couples if they object to their unions on “personal, ethical, moral, or religious grounds.” Those they turn away could be issued marriage licenses at a Department of Motor Vehicle office — an option that critics liken to the “separate-but-equal” justification for segregated schools that was ultimately declared unconstitutional.

The legislation does not specify any class of couples that could be denied licenses from clerks, but Democrats dubbed it the “Kim Davis bill,” a reference to the Kentucky clerk who was jailed last year after refusing to issue licenses to same-sex couples.

Carrico volunteered examples of clerks who objected to issuing licenses to same-sex couples or couples who had been previously divorced.

“Whether it be homosexual marriage or two heterosexuals who were divorced before, whatever that religious reason is . . . they would have an option to be able to allow those individuals to go to the DMV,” Carrico said.

When asked hypothetically whether the measure would cover clerks who object to granting licenses to interracial couples, Carrico initially said it would. He later said that, upon reflection, it would not apply because race is a “protected class” under anti-discrimination laws.

Opponents, including the American Civil Liberties Union of Virginia, contend that the measure — even as intended — is unconstitutional. But supporters, including the Family Foundation of Virginia, said it is needed to protect religious liberties in the wake of the Supreme Court’s ruling in June that legalized gay marriage.

The bill passed the Senate Courts of Justice Committee on Wednesday night over the objections of all six Democrats and one Republican, freshman Sen. Glen Sturtevant of Richmond.

If the committee passes it again, it is unlikely to make it out of the Senate given Sturtevant’s opposition, because Republicans control the chamber by a slim 21-to-19 majority. Gov. Terry McAuliffe (D) vowed to veto the measure if it reaches his desk.