George Gascon, the San Francisco district attorney who failed to win a murder conviction in the trial of a homeless illegal immigrant charged in the shooting death of Kate Steinle in 2015, announced Tuesday that he won't seek re-election.

Gascon, who clashed with candidate Donald Trump over the case -- and in 2017 referred to President Trump as a tweeting "madman" who ignited a media frenzy -- cited the need to care for his 90-year-old mother in Southern California as his reason for not running again after his second term expires next year, the San Francisco Chronicle reported.

“At this time, I simply cannot be the son I want to be and seek a third term,” Gascón said in a statement. “My career means a great deal to me. But success in the world with a family in chaos is not a choice I am willing to make.”

Gascon was heavily criticized by Trump and conservatives after the July 2015 fatal shooting of Steinle, a 32-year-old San Francisco resident who was fatally shot while walking along the city's waterfront with her father and a friend.

Soon after her death, it was revealed that her alleged killer, Jose Ines Garcia Zarate, 45, a Mexican national, had been released from a San Francisco jail under the city’s "sanctuary city" law rather than being turned over to immigration authorities.

He had been deported five times prior to Steinle’s death.

Gascon accused Trump of seizing on the case to push an anti-immigrant agenda, accusing Trump of instigating a media circus around Garcia Zarate’s trial.

Prosecutors argued that Garcia Zarate intentionally killed Steinle on Pier 14. Defense lawyers said that shooting was accidental and the bullet ricocheted off the ground and hit Steinle.

A jury acquitted eventually Garcia Zarate of murder and manslaughter charges but convicted him on a weapons charge. A juror called the shooting a “freak accident.”

After the verdict, Trump tweeted it was a “complete travesty of justice” and a “disgrace.”

Garcia Zarate faces a second round of charges from federal authorities, including being a felon in possession of a firearm and being an alien in possession of a firearm.

Gascon was appointed district attorney in 2011, after his predecessor -- current U.S. Sen. Kamala Harris, D-Calif. -- left to serve as the state attorney general.

He previously served as the San Francisco’s police chief from 2009-11.

During his tenure, Gascon faced criticism for championing progressive reforms. He endorsed Proposition 47, a 2014 ballot measure designed to alleviate prison overcrowding in the state and reduce certain crimes to misdemeanors.

He also clashed with pro-police groups for being the only law enforcement official in the state to support a failed bill that would have created a stricter standard for when police officers can use deadly force.

His decision to not prosecute officers in high-profile police killings also drew scorn from some communities of color and police-brutality protesters, the Chronicle reported.

Gascon cited a dramatic reduction in violent crime during his time as police chief and district attorney.

“It is difficult to step away, especially when we are experiencing so much success and progress,” Gascon said. “I am flattered by the robust and diverse support for my campaign and it will be hard to walk away from that. But, at this time in my life, it is the only choice I am certain I can live with.”

Suzy Loftus, former president of the city’s police commission, has filed to run for district attorney, the Bay Area's FOX 2 reported.