Two former city homicide prosecutors who had been among 31 staffers fired by Philadelphia District Attorney Larry Krasner in his first week in office have filed a lawsuit against the city and Krasner, alleging that they were victims of age discrimination.

Carlos Vega and Joseph Whitehead Jr., in their complaint filed Thursday in federal court, said they “had long, successful, and distinguished careers” in the District Attorney’s Office until they were “involuntarily terminated” on Jan. 5, 2018. Vega was 61 at the time, Whitehead 64.

The suit follows one filed in July by Tami Levin, who served as director of the office’s Victim Witness Services Unit and was also among the 31 staffers fired. She alleged in her suit that she was fired because of her race and age. Levin is white and was 51 at the time. She was replaced by Movita Johnson-Harrell, who is black and was then also 51.

Johnson-Harrell resigned from her position as supervisor of victim/witness services in the office on Jan. 25 to run for a vacant state representative seat. In March, she won the state House special election for that seat, representing part of West Philadelphia.

Both lawsuits allege violations of the federal Age Discrimination in Employment Act and other equal-protection statutes.

Jane Roh, a spokesperson for Krasner, did not immediately respond to a request for comment Friday.

Krasner, a former criminal defense attorney, took office as a progressive seeking to end mass incarceration, among other goals.

The new lawsuit says that during his campaign, Krasner “made a series of public statements that reflected his strong bias against and stereotypical views of older prosecutors, and his unwavering preference and affinity for young prosecutors,” and that he “even declared publicly that if he were elected, he would fire older prosecutors and replace them with young prosecutors.”

Both lawsuits include statements by Krasner, published in a May 16, 2017, article by the Intercept, in which he said: “There are other people who are going to be made to leave because you cannot bring about real change and leave people in place who are going to fight change every step of the way. The ones who will leave will tend to be my generation, people who started in this business 30 years ago, which means they’ll also tend to be white and male. That results in more openings, opportunities for greater diversity....”

In an interview Friday, Vega said he was a fair prosecutor who was flexible under different leaderships. “I survived under five administrations, and every administration had changes, and I adhered to those changes,” he said.

Whitehead and Levin could not be reached for comment.

The lawsuit by the two former homicide prosecutors says that they and other staffers were instructed to report to the office on a day when city offices were closed because of a snowstorm and were told by a human resources director or administrator that they could resign or be fired.

“Plaintiffs were given no explanation for why they were being forced out, and defendant Krasner never contacted or met with them to give them a reason,” according to the suit, filed by Center City lawyers Robert Davitch and Sidney Gold.

After Vega and Whitehead refused to resign, they were told to clear out their offices that day, and their cases were “reassigned to substantially younger, less experienced prosecutors who were not as qualified,” the suit says.

Vega, who is Hispanic, had worked 35 years in the office; Whitehead, who is African American, had been there 28 years.

Krasner hired many young prosecutors who were recent law school graduates, and to counter claims of age discrimination, hired about seven older attorneys for administrative and supervisory roles, but not as staff prosecutors like Vega and Whitehead, their lawsuit says.

The suit seeks unspecified monetary damages for wage and retirement losses, and “if feasible, reinstatement to the employment of the city with all attendant benefits and seniority rights.”

Levin spent more than 27 years in the District Attorney’s Office and her replacement, Johnson-Harrell, was “less qualified,” according to her July 19 lawsuit filed by Center City lawyers Stephen Console and Lane Schiff.

In an interview Friday, Johnson-Harrell said, “My credentials and my personal experience speak for themselves.”