The call came out of the blue.

A lawyer representing former President Donald J. Trump in the investigation into his handling of classified documents reached out, unsolicited, to a former employee of Mr. Trump’s Mar-a-Lago estate who was about to face questioning.

“It’s my understanding that you got a grand jury subpoena,” the lawyer, John Rowley, said in a voice mail message left for the former employee, a recording of which was provided to The New York Times on the condition that the employee not be named. “Would you please give me a call at your first opportunity?”

That outreach, meant to help the employee find a lawyer, was just one example of the ways Mr. Trump’s legal team and advisers have intersected with the legal representation for witnesses in the criminal prosecutions he is facing.

In some cases, people caught up in the cases reached out for help finding lawyers and paying their legal bills. In others, Mr. Trump’s lawyers contacted them, offering to put them in touch with lawyers already working on the cases.

Mr. Trump’s political action committee, seeded with money he had raised with debunked claims of widespread fraud in the 2020 election, became the piggy bank for paying the bills, helping to knit together the interests of key figures in the investigations.

In an interview, Mr. Rowley said he was simply trying to help witnesses who did not have lawyers or did not know how to find one, and that he never sought to influence anyone’s testimony. And legal experts said the voice mail, while somewhat unusual, did not appear to cross any ethical lines.

But as Mr. Trump’s legal problems have expanded, the ad hoc system has come under intense strain with the PAC doling out financial lifelines to some aides and allies while shutting the door on others. It is now running short of money, possibly forcing Mr. Trump to decide how long to go on helping others as his own legal fees mount.

Prosecutors have also brought conflict-of-interest questions about some of the arrangements before the courts, and witnesses and co-defendants may begin to face decisions about how closely they want to lash their legal strategies to Mr. Trump’s.

After prosecutors questioned potential conflicts among the lawyers, one key witness in the classified documents case, Yuscil Taveras, replaced his lawyer, who was being paid by Mr. Trump’s PAC and also represented one of the former president’s co-defendants in the case, Walt Nauta. Mr. Taveras is now represented by a federal public defender and is cooperating with prosecutors.

The federal judge in the documents case, Aileen M. Cannon, has scheduled hearings for next month to consider questions about potential conflicts involving lawyers for Mr. Nauta and for Mr. Trump’s other co-defendant, Carlos De Oliveira, the property manager at Mar-a-Lago.

A look at the how the arrangement came about, and how it has come under growing pressure, says a lot about Mr. Trump’s approach to legal and financial issues and his calculations about loyalty.

A spokesman for Mr. Trump did not respond to multiple requests for comment.

The question of providing lawyers first came up as Trump aides and allies were summoned as witnesses nearly two years ago by the House select committee investigating the Jan. 6, 2021, assault on the Capitol. Mr. Trump initially suggested a tight cordon of coordination, telling his aides that he wanted all of the witnesses to share one lawyer. That idea was rejected by his advisers, according to a person with knowledge of what took place.

But the effort to encourage legal coordination expanded considerably as Mr. Trump came under criminal investigation in four cases, two federal and one each in Georgia and Manhattan, drawing in a growing roster of people with ties to him.

The decision to have the PAC pay legal bills, using money from Mr. Trump’s donors, reflected the former president’s aversion to spending his own money, aides have privately conceded.

Yet Mr. Trump’s advisers did not appear to view every aide or ally who was subpoenaed, or every investigation, the same way. Some aides who were favorites of Mr. Trump personally were covered, while others were excluded.

Rudolph W. Giuliani has had only a small portion of his bills paid despite his pleas for help. Jenna Ellis, a lawyer who worked on efforts to keep Mr. Trump in power and who is among his co-defendants in the election case in Georgia, has complained publicly that her legal bills have not been covered.

Mr. Trump’s views about covering legal fees, according to people close to him, were shaped by his company’s decision in 2018 to stop covering some fees for Michael D. Cohen, his former personal lawyer and a company official. Mr. Cohen was under investigation and went on to cooperate with prosecutors and become an outspoken critic of the former president.

Mr. Trump’s employees later chose to handle another investigated aide, Allen Weisselberg, very differently, making sure his legal bills were paid. Mr. Weisselberg never provided meaningful information against Mr. Trump, even after pleading guilty and testifying against the Trump family business at a criminal tax fraud trial last year.

Susie Wiles, now one of the top advisers for Mr. Trump’s presidential campaign, oversaw the payment system for much of the past two years, according to three people familiar with the matter. In the classified documents indictment, prosecutors noted that she was involved in a conversation about Mr. De Oliveira’s loyalty to Mr. Trump shortly before the former president decided to help him with a lawyer.

By this summer, the PAC, Save America, had covered some legal bills for at least two dozen people called to provide evidence last year to the House committee as well as to criminal prosecutions of Mr. Trump.

Through that period, the PAC spent more than $20 million on legal fees, a majority of which covered Mr. Trump’s own bills.

But with his own legal bills piling up, Mr. Trump has begun shifting the burden for the legal fees for some of his allies away from Save America, reflecting the financial squeeze on the PAC and apparently a desire to keep its money available to defend Mr. Trump.

Mr. Trump’s aides recently started a legal-defense fund intended to help a number of people whose fees previously had been covered by Save America, though it is unclear how much it has raised.

Mr. Trump’s company, the Trump Organization, has also taken over for the PAC in paying legal bills for one of its employees, Mr. De Oliveira, according to a person with knowledge of the situation.

By the time Save America began to pull back in recent months, it had made payments to more than 30 law firms as well as to people for “legal consulting” related to the investigations. It is difficult to determine how much has been paid for specific clients, since several of the lawyers are representing multiple witnesses or defendants.

As The New York Times has reported, Save America — which in early 2022 had more than $100 million on hand — transferred $60 million as a donation to MAGA Inc., the super PAC supporting Mr. Trump’s campaign.

Save America made a refund request for that money, and the super PAC continues to send back money, according to a person briefed on the matter. If that money is all routed back to Save America, it would likely allow the PAC to continue to pay Mr. Trump’s bills — and possibly other people’s as well — for several months to come.

Precisely how Mr. Trump’s advisers have decided who will have their legal fees covered has remained a mystery, and it has long been an area of interest for investigators.

The arrangements among the lawyers first drew interest after one witness to the House committee, the former White House aide Cassidy Hutchinson, told the panel that Mr. Trump’s allies had provided her a lawyer who had coached her to limit her testimony.

The lawyer in question, a former deputy White House counsel under Mr. Trump named Stefan Passantino, has denied that claim. Mr. Trump’s advisers have insisted that they have never sought to influence testimony through legal payments.

In early 2022, as the criminal investigations began expanding, Boris Epshteyn, a 2020 campaign political consultant who is also a lawyer, was hired by Save America for communications work. But he began working to recommend other lawyers for some of the witnesses, according to a person briefed on what took place.

Eventually, Mr. Rowley and James Trusty, who represented Mr. Trump in the federal inquiries into his handling of classified documents and his efforts to overturn the 2020 election, began to recommend lawyers for people caught up in the investigations.

Mr. Rowley said many of those who received subpoenas either had no lawyers of their own or were not sure how to find one. He and Mr. Trusty, he added, were veteran attorneys with deep connections in Washington’s white-collar bar.

They referred some witnesses to John Irving, who also represents one of Mr. Trump’s co-defendants in the classified documents case, Mr. De Oliveira.

Mr. Trump’s legal team also referred Trump employees and aides to Stanley Woodward Jr. and his partner, Stanley Brand. Mr. Woodward ended up representing several people, including Mr. Taveras, the head of I.T. at Mar-a-Lago, who could be an important witness at the classified documents trial and who has now dropped Mr. Woodward, the lawyer for Mr. Nauta.

It is common in a sprawling investigation for lawyers to represent numerous witnesses until potential conflicts arise.

And although Mr. Rowley and Mr. Trusty talked to several witnesses, they simply made recommendations about who the witnesses might hire, allowing them to make the final decisions on their own, Mr. Rowley said.

“We didn’t care one way or the other what they ultimately did,” Mr. Rowley said. “We just wanted people who needed representation to be represented.”

He said that was particularly true because of “the level of aggressiveness” he and Mr. Trusty “were seeing from the D.O.J.”

Mr. Trusty, in a separate interview, noted that prosecutors for Jack Smith, the special counsel, “cast a very wide net, including everyone from groundskeepers and maids to Secret Service agents,” and said that there were “a lot of intimidating tactics.” The witnesses he said, “were pretty unsophisticated about criminal justice in general” and “needed good lawyers who knew the Department of Justice and the particular nooks and crannies of federal investigations.”

Not all the witnesses were seeking their help. The Mar-a-Lago employee who received the voice mail from Mr. Rowley hired a lawyer on his own and paid the legal fees out of his own pocket.

Bruce Green, who teaches legal ethics at Fordham Law School in New York, said there was not much meaningful difference between grand jury witnesses asking Mr. Trump’s lawyers for help in finding legal representation and the lawyers reaching out to the witnesses to see if they wanted or needed representation.

The larger question, Mr. Green said, was the motive behind offering such help and whether the lawyers, once hired, acted in the interests of their clients or on behalf of whoever helped to put them in place.

“What we have here is a lot of smoke,” said Stephen Gillers, a legal ethics professor at New York University. “But we haven’t seen the fire yet.”