The Hon. Benjamin C. Barnes will become the new first justice of the Edgartown district court next month, a court spokesman said.

Chief Justice of the District Court Paul C. Dawley has appointed Judge Barnes to a five-year term on the bench, replacing Judge J. Thomas Kirkman who retired in May after reaching the mandatory retirement age of 70.

The new appointment takes effect Oct. 7, said Jennifer Donahue, a spokesman for the district court.

The district court operates in 62 locations across the state and handles a variety of criminal, civil, housing, juvenile, mental health, and other types of cases. More serious crimes and more complex civil cases are handled by the superior court.

Currently the first justice of the Malden district court, Judge Barnes was appointed to the bench in 2009 by Gov. Deval Patrick.

He is a graduate of Fisk University and earned his law degree in 1990 from Suffolk University Law School. After several years in private law practice in Los Angeles, he returned to Massachusetts where he worked as an assistant district attorney in Middlesex County, chairman of the license commission for the City of Cambridge and as a clerk-magistrate in Palmer district court.

When the Edgartown court is not in session, Judge Barnes will be assigned to sit in other courts located in region one, which includes the Cape and Islands as well as several courts in Bristol County, Ms. Donahue said.

The Hon. John Julian, first justice of the Barnstable district court, has been assigned to Edgartown since Judge Kirkman’s retirement.