MONTGOMERY, Ala. — The former chief justice of the Alabama Supreme Court who refused to move a Ten Commandments display from a courthouse is a step closer to getting his old job back.

Roy Moore received a little more that 50 percent of the vote to win the Republican nomination for his old job. He is heavily favored to win the general election in November over Harry Lyon, an attorney who is the Democratic nominee.

Moore got enough votes to avoid a runoff with either of his GOP opponents — a former attorney general and the current chief justice.

It was an improbable comeback for Moore, who in 2003 was ousted from the chief justice’s office for refusing a federal judge’s order to move a Ten Commandments display from the state judicial building.