David Livingston / Getty Images Contributor Sheriff of Los Angeles County Lee Baca, pictured at the Los Angeles Mission Christmas Eve Celebration, December 24, 2013 in Los Angeles.

Embattled Los Angeles County Sheriff Lee Baca announced Tuesday that he will step down from his post at the end of the month and will not run for a fifth term as the county's top cop later this year because he doesn't want "a campaign of negative contentious politicking."

At a press conference at department headquarters in Monterey Park, Baca said he is retiring on his "own terms" out of "the highest of concern for the future of the sheriff's department." He called the decision "the most difficult of my professional life."

"We've had a great journey over the years," said Baca. "I've held fast to the core values of this great department. That's who I am, that's who we are."

In addition to "personal and private" reasons, he said, he is retiring because of the "negative perception this upcoming campaign" has brought to the men and women of the department.

His decision to retire comes weeks after Andre Birotte Jr., the U.S. Attorney for California's Central District, announced charges against 18 current and former deputies assigned to the Los Angeles County jails in connection with “a wide scope of illegal conduct,” including allegations of unjustified beating of inmates, unjustified detentions and a conspiracy to obstruct a federal investigation.

Separately, the U.S. Justice Department found that deputies patrolling the Antelope Valley in northern Los Angeles County repeatedly harassed and intimidated blacks and Latinos including using racial profiling and excessive force. And the Los Angeles Times reported last month that Baca's Sheriff's Department hired dozens of officers even though investigators found they had committed serious misconduct both on and off the job.

At the time, Baca said he was troubled by the charges and called it a sad day for his department.

One source, who like the others spoke on condition of anonymity, said the 71-year-old Baca, who has served 15 years as County Sheriff, made “a difficult decision,” but one that was “in the best interests of the department and people of Los Angeles County.”

“This was one of the most difficult decisions of the sheriff's professional career,” said the source. “He made it clear that he was doing this to remove any distractions from the positive work that the L.A. County Sheriff's Department is doing on behalf of the county.”

The L.A. County Board of Supervisors will choose an interim Sheriff with input from Baca. Baca said Tuesday he supports Assistant Sheriff Terri McDonald to serve as his interim replacement.

McDonald, standing behind Baca at the press conference, is a 24-year veteran of the California Department of Corrections and Rehabilitation.

Baca's retirement leaves the race for his successor wide open. A primary is scheduled for June, with a general election in November if necessary. Those running include Sheriff's Cmdr. Bob Olmsted, who oversaw the troubled county jails, as well as under-Sheriff Paul Tanaka, who ran operations for the Sheriff's Department until last Summer when he stepped down amid a bitter and public falling out with his former boss.

Long Beach Police Chief and former LAPD Assistant Chief Jim McDonnell initially expressed interest in running for sheriff but decided against it at the time because amassing the money necessary to take on a longtime incumbent would have been a distraction from his primary job.

Another law enforcement source, who asked not to be identified, said late Monday that McDonnell would be open to reconsidering his position given recent developments.

During his four terms in office, Baca won praise for programs that benefited the homeless and inmates. He was one of the driving forces -- along with then LAPD Chief William Bratton and former District Attorney Steve Cooley -- behind the new state-of-the-art crime lab at Cal State Los Angeles.

The department grew from 14,000 to 19,000 employees under Baca as crime fell to the lowest levels in a generation. In addition, it absorbed the troubled Compton Police Department, drastically reducing crime in that city.

Baca also created the Office of Independent Review, headed by former federal prosecutor Michael Gennaco, to oversee the department's internal investigations.

Early in his tenure, Baca had a knack for getting ahead of public controversies, including a spate of murders in the Los Angeles County Jail, a contagious fire incident in Compton when deputies unloaded 120 rounds at a car-chase suspect in a residential neighborhood, an uproar about early release of inmates and even a decision to release socialite Paris Hilton early from jail.

But a series of recent controversies began to weigh heavily on the department. In the most significant of the missteps, sheriff's deputies learned about an informant at the Men's Central jail who was assisting FBI agents with an investigation and had received a cell phone.

The officers, who were named in a grand jury indictment last month, then allegedly attempted to hide the informant from the FBI and the U.S. Marshals Service. Two sergeants named in the case allegedly confronted an FBI agent at her home in order to intimidate her into divulging details of the investigation.

Related: Nearly 20 LA sheriff's deputies charged in corruption, inmate abuse probe

More from NBC News Investigations:

Follow NBC News Investigations on Twitter and Facebook