Republican Gov. Charlie Baker will soon have the opportunity to make his first nomination to the state's highest court.

Robert Cordy, an associate justice of the Massachusetts Supreme Judicial Court, announced Wednesday that he plans to retire at the end of the court's current term in August.

Cordy was appointed to the seven-member high court by then-Gov. Paul Cellucci in 2001. Cordy previously served in private law and in public capacities, including as a federal prosecutor and chief legal counsel to former Gov. William Weld.

Cordy wrote one of three dissenting decisions in the court's landmark 4-3 ruling in 2003 that made Massachusetts the first state to legalize gay marriage.

SJC chief justice Ralph Gants says Cordy has authored hundreds of "carefully crafted and reasoned majority opinions" during his tenure.