A federal judge expressed deep frustration with lawyers for the City of Boston Friday, withdrawing a legal opinion he issued in April supporting temporary changes to the city's exam schools admission policy.

“Everyone agrees I’ve been misled,” Federal District Court Judge William Young said at the hearing several times, noting that he had never taken back an opinion in his 36 years on the bench.

The ruling approved a temporary plan, created during the pandemic, that allowed the city's selective exam schools to admit students based on grades and zip codes. In a 48-page ruling, Young found that the plan was race neutral and allowed it to go forward.

The ruling was in response to a lawsuit by a group called the Boston Parent Coalition for Academic Excellence, which filed a lawsuit against the district earlier this year, arguing that the plan discriminated against white and Asian students.

Young said he was disturbed that the city did not disclose several pages of text message exchanges between members of the Boston School Committee that came to light after he had rendered his opinion. He said the text message exchanges were not periphery to his ruling and altered its accuracy.

The withdrawal presented a staggering twist in the long-running dispute over admissions to Boston Public Schools' three prestigious exam schools: the Boston Latin School, Boston Latin Academy, and the John D. O'Bryant School of Mathematics and Science. It also comes as the Boston School Committee prepares to vote on a permanent exam school admissions policy later this month.

The Boston NAACP and other civil rights groups had hailed that ruling as ushering in a new era of race relations in Boston.

The Coalition had appealed Young's April ruling and it was not immediately clear how the withdrawal effects the case; Young also noted at the hearing that his judgement still stands.

Under questioning, Kay Hodge, the lawyer representing the schools, told Young that she had initially been unaware of the text messages and was extremely busy at the time.

“Nobody considered this any kind of misrepresentation to the court,” Hodge said, urging Young not to withdraw the opinion. “There were mistakes made. They were not fraudulent,” she said.

The text exchanges occurred during a Boston School Committee meeting last October that included several hours of heated public testimony for and against changing the admissions policy for the three exam schools.

School Committee Chairman Michael Loconto made remarks caught on an open microphone during the discussion that appeared to mock the names of several Asian people commenting before the committee. He resigned the next day. Following the incident, news outlets demanded the release of all text exchanges between school committee members during the meeting.

But a batch of exchanges were not released by the city when it fulfilled those requests. And the existence of those text exchanges was not publicly known until they were leaked to The Boston Globe last month, and well after Young had issued his opinion. The omitted texts, later released by Acting Mayor Kim Janey's office, showed two Latina school committee members, Lorna Rivera and Alexandra Oliver-D’Avila, exchanging disparaging remarks about white residents in West Roxbury, a neighborhood that had derived outsized benefits from the old exam school admissions system. Both women resigned within days of the texts being made public.

Young wanted to know at Friday's hearing why the city’s lawyers did not come forward when the text messages were revealed, saying they were “not periphery” to his opinion. Young took particular issue with the city’s response that the transcripts of that contentious meeting were presented as complete.

“Did it occur to you the court had been misled here?” Young asked Hodge, who replied no, adding that she and the other city lawyers have been focusing on a separate case.

"Comments like, 'I hate West Roxbury' are not the same character of comments like, 'I like Kit Kats, the candy bar," Young said. "It's ludicrous."

“We apologize,” Hodge said. I want to be clear, we are apologizing for any ... impacts and we are endeavoring to do better.”

Bill Hurd, a lawyer representing the Boston Parent Coalition in its appeal of Young's decision, said he hoped the judge would return the case to federal court.

Young noted that there is just a month and a half before the start of school. And he said he had issued his ruling in the case mindful that students and their parents need to make plans for the upcoming academic year. He said lawyers on both sides will have 30 days to issue briefs articulating their positions going forward.