JACKSON, Miss. — A Mississippi judge jailed a lawyer for several hours for refusing to recite the Pledge of Allegiance, ordering the attorney to “purge himself” of contempt by standing and repeating the oath like the rest of the courtroom.

After Oxford attorney Danny Lampley spent about five hours in the county jail Wednesday, Chancery Judge Talmadge Littlejohn let him go free. Lampley, 49, was released so that he could represent another client, the judge said in a later order.