HARTFORD, Conn. — Connecticut Gov. Dannel P. Malloy’s nominee for state chief justice would be the first openly gay leader of a state Supreme Court.

The Democratic governor announced Monday that longtime friend and current Associate Supreme Court Justice Andrew McDonald was his nominee for the court’s highest post. Chief Justice Chase Rogers is retiring next month after more than 10 years on the job.

While McDonald would be the first openly gay state chief justice, Puerto Rico Chief Justice Maite Oronoz Rodriguez became the first openly gay Supreme Court leader in U.S. history in February 2016.

The 51-year-old McDonald has served on the Supreme Court for five years and was nominated by Malloy. Before that, he was general counsel for the governor’s office under Malloy, a state senator from Stamford and corporation counsel for the city of Stamford when Malloy was mayor.

McDonald was co-chairman of the legislature’s Judiciary Committee in 2005 when lawmakers approved same-sex unions. Gay marriage in the state was legalized by a 2008 state Supreme Court ruling.

McDonald, who must be confirmed by the legislature, thanked his family, teachers, colleagues and husband Charles Gray during Monday’s announcement with Malloy.

“When I was born here in Connecticut a little more than 50 years ago, loving relationships like the one Charles and I cherish were criminal in 49 states including Connecticut,” he said.

“When I came out in the early 1990s, I had family members who loved me deeply but still counseled me against pursuing either a career in law or in public service because of the deeply ingrained prejudices held by some people at that time,” he said. “But now, because of changes brought about by evolving understanding of people, new statutes passed by legislators and important court cases — indeed by the rule of law — this day was made possible.”

Malloy called McDonald a long-time friend who “has proven himself to be a consummate, revered jurist who has an exceptional ability to understand, analyze, research, and evaluate legal issues.”