BOSTON (AP) — The mystery of the unknown justice has been solved.

The man whose portrait has hung for years outside the chamber of the highest court in Massachusetts without anyone actually knowing who he was now has a name: Lemuel Shaw, who served as chief justice of the Supreme Judicial Court from 1830 until 1860.

In February, current Chief Justice Ralph Gants sought the public’s help in identifying the man and received more than 40 educated guesses.

Gants credits two court employees, assistant chief court officer Keith Downer and Director of Education and Public Programs Cliff Allen, with nailing down the identity through some nifty detective work.

Gants says Downer used his experience in forensic science and knowledge of fine art.

Shaw’s name will be attached to the portrait next month.