Discussions among a group of lawyers with allegiance to the president were closely held. Some senior White House officials were said to have felt blindsided as the agreement took shape.
The ruling was a blow to both President Trump, who had voluntarily dismissed the suit last week, and to the Justice Department, which used the suit to establish a fund likely intended for Trump allies.
In a stern order on Friday, a judge said that she wanted to investigate the circumstances surrounding President Trump’s efforts to settle the lawsuit in a way that benefited him and his allies.