Fredericton Police Chief Barry MacKnight has announced that he will be stepping down on July 1.

MacKnight, 49, said he was planning to retire in early 2013, but has come to an agreement with the city where the early retirement provisions of the contract will be honoured.

"It was an opportunity that came up and I talked to the city administrator and the mayor and we came to an agreement, simple as that," he told CBC News Wednesday.

"The time was right," MacKnight said earlier in a statement.

"It is time for a change."

MacKnight has been chief for seven years and on the force for 25 years.

It's been "a satisfying run," he said in the statement, calling it an "honour" to work with so many professional police officers and a "privilege" to work with city council and staff.

"I know I am leaving the city in the good hands of a very professional and dedicated police force, and I am proud of that," MacKnight said.

"I also want to thank the people of Fredericton for their support over my tenure."

Fredericton Mayor Brad Woodside says the process to choose a successor will be decided in the coming days after he discusses the matter with council and the chief administrative officer.

MacKnight served the city well, Woodside said.

"I especially appreciate that he always worked with the city’s best interests at heart and I wish him the very best in any future endeavours."

On heels of blogger controversy

MacKnight's retirement comes on the heels of difficulties between the force and controversial blogger Charles LeBlanc.

LeBlanc, who faced charges of criminal libel earlier this year for allegedly damaging the reputation of a police officer on his website, was arrested at the legislature last month.

Police said LeBlanc was arrested after a complaint of "assault by trespasser." LeBlanc has been banned from the legislature grounds since 2006.

LeBlanc is scheduled to appear in court on June 25.

The investigation has since been handed over to the RCMP.

MacKnight, who plans to find another job, says his early departure from the force has nothing to do with LeBlanc's case.

"It's an important issue, but we deal with important issues here every single day," he told CBC News. "It's what police officers do every day — they make very difficult decisions based on good faith and the information they have at the time.

"I can't be any clearer about this," he said. "The past two months have been no harder than any few months I've ever been in this job. Yeah, this is a hard job, and somethimes the media is engaged in the issues we're dealing with and sometimes they're not."

MacKnight said the investigation will continue with the city administrator. He declined to comment any further on the case.

LeBlanc's arrest came just days after he and his lawyer called for a public inquiry into the Fredericton Police Force's handling of a raid at LeBlanc's home in January.

LeBlanc, who writes a controversial blog that is often critical of police officers, politicians and the legislature's sergeant-at-arms, was accused of damaging the reputation of a city police officer in blog posts last summer.

Police seized his computer and LeBlanc says he was told he would be facing charges of criminal libel.

But on May 4, the provincial government announced it would not be proceeding with criminal libel charges against LeBlanc, saying that section of the Criminal Code has been deemed unconstitutional by other jurisdictions.