BOSTON (AP) — The case of the unknown Massachusetts high court justice has been solved.

Nearly two months after the Supreme Judicial Court appealed to the public for help identifying the man whose portrait hangs outside the chief justice's chambers, he has a name: Lemuel Shaw, who served as chief justice from 1830 until 1860.

The court received more than 40 "informed guesses" on the identity of the mystery man, but Assistant Chief Court Officer Keith Downer's nifty detective work was what cracked the case.

Among other things, Downer performed bright yellow and white light tests that revealed the loop script initials "LS" on the wood panel attached to the canvas, court officials say.

"The remarkable level of interest among members of the public and over 40 submissions received is an example of civic engagement at its best," Chief Justice Ralph Gants said in a statement.

Court officials say they believe the portrait was painted sometime before or around the time Shaw was appointed to the high court in 1830. While they say they can't be 100 percent sure they've solved the high court mystery, they're confident Shaw's the man.

Shaw, who was the father-in-law of "Moby Dick" author Herman Melville, also served on the Massachusetts state Senate and House of Representatives and as a member of the Constitutional Convention of 1820. He was also a selectman for Boston and drafted the act of incorporation and charter for the city.

Shaw died less than a year after he retired from the court in August 1860.

When the court turned to the public for help in February, officials said they believed he was an associate justice and had all-but ruled out that he was a chief justice. Court officials had even tried to run the portrait through the Google program that matches a persons' likeness to a painting, with no luck.

Shaw's name will be attached to the portrait next month. The 10 people who correctly guessed his identity are being invited to the ceremony and will get a tour of the John Adams Courthouse.

___

Follow Alanna Durkin Richer at http://twitter.com/aedurkinricher. Read more of her work at http://bit.ly/2hIhzDb.