DOVER — The city has hired a new city attorney after being without one since the departure of Allan Krans in June.

Anthony Blenkinsop, the director of the Charitable Trusts Unit with the New Hampshire Attorney General’s Office and a member of the Portsmouth Planning Board, will take over the position as Dover’s general legal counsel at the end of August, according to City Manager Mike Joyal.

Blenkinsop submitted a letter of resignation to the Portsmouth City Council. In the letter, Blenkinsop also wrote that he will also be leaving his position with the New Hampshire Attorney General’s Office, one he has held since 2011.

“I’m very excited about the opportunity,” Blenkinsop said, adding that the chance to practice law while engaging in public service was too good to pass up.

Joyal said Blenkinsop’s experience is a large part of why he was considered the best candidate for the job. The search for a new attorney began before Krans left to become the executive director of the Dover Housing Authority in June. Joyal said the city received about 40 inquiries and narrowed the hiring pool to 19 qualified applicants.

“We advertised throughout the state,” Joyal said.

The field was then narrowed down to five applicants.

“We arranged a panel interview and they recommended two very strong candidates for me to consider,” Joyal said. “Ultimately, after meeting with Anthony and checking his background and references, he was the candidate selected.”

Joyal believes Blenkinsop will be familiar with many issues that will confront a city attorney, including interpreting state laws, helping the city avoid situations that could become a legal liability and consulting with the City Council on new forms of legislation.

“Anthony has very good credentials (and) he has significant amount of experience,” Joyal said. “He brings some enthusiasm and he has long-standing and obvious commitment to public service.”

Blenkinsop, a graduate of Suffolk Law School, began working with the New Hampshire Attorney General in 2004.

“I’ve loved my time at the AGs’ office,” Blenkinsop said. “When I saw this, it seemed like a pretty special opportunity that made it worthwhile for me.”

As general legal counsel for the city, Blenkinsop will be responsible for representing the city and its departments in District and Superior Court, drafting resolutions and ordinances and updating city officials on legislation and legal decisions. He will also serve as a legal consultant to boards and officials and attend City Council meetings.

According to Joyal, Blenkinsop has been hired as a full-time employee with a starting salary of $88,500 a year.