Merced City Attorney Gregory Diaz confirmed plans Wednesday to leave the city after 13 years to accept an appointment as the Ventura city attorney.

Diaz, who starts his new job on Sept. 15, said leaving Merced wasn’t an easy decision. In fact, the 52-year-old had planned to retire here.

“It took three calls from the recruiter to actually get me interested because I was pretty happy here,” Diaz said. “It was a very difficult decision; we’ve made some wonderful friends here.”

The move down south puts Diaz closer to family and friends. He grew up in Southern California and received his bachelor’s degree in Public Administration/Political Science from California State University, Long Beach, and his law degree from Western State University, College of Law in Fullerton.

Diaz said he’s proud of several projects during his tenure: the opening of UC Merced, construction of the G Street underpass and the renovation of the Merced Theatre. Recently, Diaz played a critical role in reaching an agreement with an organization that had threatened to sue Merced over its at-large election system.

“While it wasn’t a unanimous support for every element of the settlement, I think by and large it’s a good one for the community,” he said. “We could have paid $4 million and ended up in the same place.”

Diaz hopes his successor will work with Merced County and the Merced Irrigation District to focus on flood control issues. “This community has a history of having a substantial flooding event every 10 years,” he said, “and we don’t think about that during the drought.”

Merced Mayor Stan Thurston on Wednesday called Diaz an “outstanding” city attorney.

“It’s going to be incredibly hard to replace him,” the mayor said, adding the city likely will hire a temporary attorney while it recruits a successor. “When an issue came up, he thoroughly researched the issue. I know all of us had great trust in his knowledge and opinion of matters.”

Merced’s loss is a gain for Ventura, a city of about 106,000 residents, according to city officials there.

“Mr. Diaz brings a wealth of municipal experience that will benefit Ventura,” said Mayor Cheryl Heitmann in a news release. “We were impressed with his emphasis on solving problems in a collaborative manner with staff, council and the community.”

Merced City Manager John Bramble said Diaz is the best attorney he’s ever worked with. “He’s very intelligent and insightful, and I’m going to miss that,” Bramble said. “We made a good team, and he was always willing to provide me his opinion on policy.”