BOSTON -- Boston Public Schools Superintendent Tommy Chang will be leaving his post before the start of the new school year, he and Mayor Marty Walsh confirmed Friday. The news comes one day after a coalition of civil rights and student advocacy groups sued the Boston Public Schools to find out how much student information the system shares with federal immigration officials.

Chang declined to give a reason for his resignation. In a statement to CBS Boston, Chang said, "I am in active negotiations with the Boston School Committee for a mutual parting of ways."

Walsh issued a statement saying "we have mutually agreed that there needs to be a change in leadership at BPS."

Get Breaking News Delivered to Your Inbox

Chang had two years left on his contract.

According to The Boston Globe, Chang has been involved in a number of controversies since he took the post in 2015, including proposing last year to change school start times and an Internal Revenue Service audit that found mismanagement of student activity accounts. And a 2016 investigation by federal prosecutors into the city's prestigious Boston Latin School found the school failed to take racial hostility seriously, according to WBUR.

In his farewell statement posted on the Boston Public Schools website, Chang said he was "grateful to the people of Boston for the opportunity to serve here — and for what that opportunity means about what's possible in America."

"Thirty-seven years ago, as an immigrant from Taiwan, I showed up in public schools without a word of English," the farewell letter said. "Public school teachers guided me in a journey that gave me one of the greatest responsibilities a human being can have —the education of a city's children. In this moment more than ever, I want every immigrant child to know that's the country America strives to be, must be, and will be."

The groups that filed Thursday's lawsuit, including the Lawyers Committee for Civil Rights and Economic Justice, alleged the school system and Chang have a "disturbing practice" of giving student information to immigration authorities.

The lawsuit stems from the deportation of an East Boston High School student. The lawsuit says evidence used by federal officials in deportation proceedings included a school report about two students who tried unsuccessfully to start a fight.

The school's incident report included unsubstantiated allegations of gang involvement, according to the lawsuit.

The school shared the report with the Boston Regional Intelligence Center, a collaboration of local, state, and federal law enforcement agencies that includes Immigration and Customs Enforcement agents.

The student was held in custody for more than 16 months before being deported, the lawsuit said.

East Boston is a hotbed of activity for the violent MS-13 gang, federal authorities have said.

"The issue of public schools' cooperation with law enforcement - already of intense public importance - has taken on heightened urgency for immigrant families since 2017," the lawsuit says. "As federal deportation efforts intensify, the question of how and under what circumstances public schools are providing information to the U.S. Department of Homeland Security Immigration and Customs Enforcement has become even more crucial."

Chang has previously said the schools don't share student information.

A schools spokesman said he could not comment.

"Neither the city of Boston nor Boston Public Schools have been served with the lawsuit," spokesman Dan O'Brien said. "Boston Public Schools will review the lawsuit once it is received."