SUFFOLK COUNTY District Attorney Daniel Conley shook up the legal landscape on Tuesday with word that he won’t seek reelection this fall. The news came as a longtime Boston defense attorney was preparing to mount the first challenge to Conley in the 16 years since he won the post in 2002.

“I love the job, the office, its staff, and the people and communities we serve,” Conley said in a statement. “But I have long believed that those of us fortunate enough to lead as elected officials must also be willing to give others the same opportunity.”

Conley indicated that he planned to serve out the remainder of his term, which ends next January.

Conley, who served a decade on the Boston City Council before being elected to the prosecutor’s job, had shown no signs of losing focus on the DA’s post, playing a vocal role in the criminal justice reform debate on Beacon Hill over the last year. As of January 31, his campaign account had a balance of $332,600.

News that Conley will step down came as longtime Boston defense attorney Shannon McAuliffe was laying plans to challenge him this fall, according to sources, and it comes against the backdrop of a national rethinking of criminal justice policies that has included efforts to elect reform-minded district attorneys. Locally, the ACLU of Massachusetts launched a public information campaign earlier this month aimed at increasing awareness of the crucial role played by DAs in the criminal justice system.

CommonWealth called Conley’s office on Tuesday afternoon to ask whether he was seeking reelection and told a spokesman the magazine was preparing a story on McAuliffe’s challenge. Shortly after came word that Conley would not seek another term.

In a run against Conley, McAuliffe was likely to call for a turn away from the traditional tough-on-crime approach employed by many prosecutors. She has emphasized efforts to divert more offenders from incarceration and toward programs with a focus on rehabilitation. She has also raised questions about racial disparities in the criminal justice system, which has seen incarceration rates soar in Massachusetts — and across the country — over the last several decades.

Until recently, McAuliffe directed the Boston office of Roca, a Chelsea-based nonprofit that works with gang- and court-involved young men.

A Suffolk Law School graduate, McAuliffe worked for 15 years as a state and federal public defender, according to an online biography from a Harvard Kennedy School public leadership forum she took part in last year. In 2012, according to the summary, she turned her focus to broader policy issues, enrolling at the Harvard Kennedy School where she obtained a master’s degree in public administration before joining Roca, which works with high-risk young men, employing a range of strategies aimed at helping them maintain employment and avoid incarceration.

McAuliffe was likely to make a formal announcement in the next two weeks. Whether Conley’s decision to step down, which is likely to draw other candidates to the race, will change her plans is unclear. She did not return a message late Tuesday.

Boston City Councilor Michael Flaherty, a former assistant district attorney who has long eyed the DA’s post, said in a statement, that he plans to consult with his family about a possible run for the seat.

An open race for DA in Suffolk County, which includes Boston, Winthrop, Chelsea, and Revere, will unfold as as lawmakers on Beacon Hill are working to reach agreement on a sweeping criminal justice reform bill.

Conley, who oversees prosecutions in the state’s most racially diverse county, has largely fallen in line with most of his fellow DAs on criminal justice policy. But he has also sought to carve out ground on some issues between reform advocates and the state’s most hardline DAs, and he would likely not have easily the reform mantle to a challenger.

Under his lead, the Suffolk DA’s office prided itself on reforms in 2004 to procedures for use of eyewitness identification in cases to prevent erroneous convictions. He also brought new levels of transparency to the office’s handling of police-involved shootings. In an email today to his staff, Conley said of that policy, “few prosecutors’ offices in the country come close to what we do.”

Incarceration rates in Massachusetts, as is the case nationally, rose steadily over the last four decades. But they have been decreasing in recent years. The state Department of Correction prison population fell 19 percent from its peak in 2012 to 2016, while the inmate population at the Suffolk County House of Correction has dropped by 40 percent over the past five years, according to Conley’s email to his staff.

Last July, the ACLU released results of a poll of Massachusetts voters examining attitudes toward and understanding of the criminal justice system. According to the poll, 73 percent of voters believe the criminal system works differently for different people.

The state district attorneys’ association slammed the poll as a “self-serving” exercise by the ACLU and pointed to a recent MassINC Polling Group survey reporting that 75 percent of votes had a lot of confidence or some confidence in the criminal justice system.

Conley’s office took a different tack.

“Reform-minded district attorneys across the country are following the course that DA Conley has been charting in Suffolk County for years,” Conley’s office said in a statement in response to the poll. The statement cited, among other things, advocates’ praise for Conley’s work to identify and prevent wrongful convictions and the fact that he was the only DA in the state to support former governor Deval Patrick’s CORI reform efforts. “The ACLU’s poll shows that Dan Conley has exactly what the poll respondents want most in their DA — a reputation for honesty and doing what’s right,” it said.

In October, Conley joined with eight of the state’s 11 DAs in co-authoring a letter to Senate leaders that was harshly critical of the criminal justice bill being considered by the Senate. (Middlesex District Attorney Marian Ryan and Northwestern District Attorney David Sullivan did not sign on to the letter.) The bill, which the Senate ultimately passed on a 24-10 vote, removes mandatory minimum sentences for some drug dealing offenses and raises the weight threshold for other dealing offenses. It would also raise the minimum age of adult court jurisdiction from 18 to 19.

The DAs said “too many aspects of the bill” would work to throw the state’s criminal justice system “out of balance.” They said it “undermines the cause and pursuit of fair and equal justice for all, largely ignores the interests of victims of crime, and puts at risk the undeniable strides and unparalleled success of Massachusetts’ approach to public safety and criminal justice for at least the last 25 years.”

The letter noted, however, that Conley parted with his co-signers by favoring abolition of minimum mandatory sentences for selling drugs within a school zone as well as ending mandatory sentences that now kick in for second and subsequent drug offenses.

At a Boston College forum a year ago, however, Conley pushed back hard on the overall idea of abolishing mandatory minimum sentences, saying they have played a role in the sharp decline in crime in Boston over the last several decades. Conley slammed Supreme Judicial Court Chief Justice Ralph Gants, who delivered the keynote address at the same symposium and called for an end to most mandatory minimum sentences. Conley said Gants had become “more political than any chief justice I’ve ever seen.” Conley said he had heard from other judges who found Gants’s advocacy “unseemly.”

In 2013, in his only attempt to win another office after becoming DA, Conley placed fourth in the 12-way preliminary contest for the open Boston mayor’s seat.

A wide open race for DA this fall will unfold on the heels of an ACLU public information campaign launched earlier this month. ACLU officials say the effort, dubbed “What a Difference a DA Makes,” aims to raise public awareness of the crucial role played by DAs. The poll released last summer by the organization reported that half of voters thought DAs have only a minor or insignificant impact on how the criminal justice system functions, and 38 percent did not even know DAs were elected.

Rahsaan Hall, director of Racial Justice Program at the ACLU of Massachusetts, said the voter information campaign will “give us the opportunity to talk about the importance of having contested elections and the different policy positions DAs can have on racial disparities and over-incarceration”

“Without contested races,” he said, “it’s hard to have those conversations. Our role is to help educate the public on what the power of DAs is, what it has been, and what it should be.”

The ACLU’s nonprofit status means it cannot endorse candidates, but it is free to educate voters about policies it favors. In other cities that has involved public information campaigns that aligned closely with the platform of DA candidates pushing a reform agenda.

Most notably, the group canvassed voters last fall in Philadelphia to raise awareness of the DA’s race there. Longtime civil rights lawyer Larry Krasner was elected in a contest that saw billionaire liberal philanthropist George Soros pump more $1 million toward his campaign. In Dallas, the ACLU launched a $300,000 voter education campaign earlier this month to draw attention to the March 6 Democratic primary for DA there.

The ACLU of Massachusetts said 600 people have volunteered so far to help with canvassing and voter information efforts for the statewide campaign here.