After avoiding indictment for years, former President Donald J. Trump now appears closer than ever to facing criminal charges in Manhattan.

The Manhattan district attorney’s office has signaled that he could face criminal charges for his role in a hush-money payment to a porn star, the strongest indication yet that prosecutors are nearing an indictment of the former president, according to four people with knowledge of the matter.

That was followed by developments in the federal inquiry, now in the hands of a special counsel, into Mr. Trump’s handling of classified materials that were found at his home in Florida. On Wednesday, a federal appeals court ruled that a Trump lawyer had to give prosecutors what are likely to be dozens of documents related to his legal work for Mr. Trump and to appear before a grand jury to answer its questions.

The fight suggests that the prosecutors are working to assemble evidence that Mr. Trump could have committed a crime in defying the government’s efforts to reclaim the classified materials he took with him after leaving the White House.

The special counsel is also overseeing a parallel investigation into Mr. Trump’s efforts to reverse his defeat at the polls in 2020 and his role in the events that led to the storming of the Capitol by his supporters on Jan. 6, 2021.

In New York, the district attorney, Alvin L. Bragg, impaneled a grand jury in January to hear evidence in the longest-running criminal inquiry facing the former president. Since then, his prosecutors have questioned at least nine witnesses before the panel, though it is unclear whether they have completed their presentation of evidence.

Any case would mark the first indictment of a former American president. Here is where the notable inquiries involving the former president stand.

Prosecutors in the district attorney’s office have signaled to Mr. Trump’s lawyers that he could face criminal charges.

They did this by offering Mr. Trump the chance to testify last week before the grand jury that has been hearing evidence in the potential case, people with knowledge of the matter said. Such offers almost always indicate an indictment is close; it would be unusual for prosecutors to notify a potential defendant without ultimately seeking charges against him.

In New York, potential defendants have the right to answer questions in front of the grand jury before they are indicted, but they rarely testify, and Mr. Trump is likely to decline the offer.

The office’s investigation into Mr. Trump once appeared to be at a dead end.

Under Mr. Bragg’s predecessor, Cyrus R. Vance Jr., the district attorney’s office had begun to present evidence to an earlier grand jury about Mr. Trump’s business practices, including whether he had fraudulently inflated the value of his real estate to secure favorable loans and other financial benefits. (Mr. Vance’s prosecutors were also investigating the hush money).

Yet in the early weeks of his tenure last year, Mr. Bragg developed concerns about the strength of that case and decided to abandon the grand jury presentation, prompting the resignations of the two senior prosecutors leading the investigation.

But last summer, Mr. Bragg’s prosecutors returned to the hush-money case, seeking to jump-start the inquiry after the departures of the senior prosecutors, Mark Pomerantz and Carey R. Dunne.

Mr. Bragg’s office is also continuing to examine the way in which the former president valued his assets, people with knowledge of the matter said.

Mr. Trump has referred to Mr. Bragg, a Democrat, as a “racist” and to the criminal investigation as a politically motivated “witch hunt.” He has called on his supporters to protest on his behalf, in a social post reminiscent of those that preceded the attack on the U.S. Capitol on Jan. 6, 2021.

The first visible sign of progress in the hush-money case for Mr. Bragg came in January, when Michael D. Cohen, Mr. Trump’s former lawyer, met with prosecutors at the district attorney’s Lower Manhattan office — the first such meeting in nearly a year. Mr. Cohen has since returned for several additional interviews with the prosecutors and testified before the grand jury.

Since Mr. Bragg impaneled the grand jury in January, it has heard testimony from Mr. Cohen, as well as two former National Enquirer executives, who had helped broker the hush-money deal. Ms. Daniels’s former lawyer also testified, as did two senior officials from Mr. Trump’s 2016 campaign, Hope Hicks and Kellyanne Conway. The grand jury has also heard testimony from two employees of the Trump Organization, Jeffrey McConney and Deborah Tarasoff.

And most recently, the grand jurors heard from a witness, Robert J. Costello, who sought to undermine Mr. Cohen’s credibility. Mr. Costello, a former legal adviser to Mr. Cohen who had a falling out with him, testified at the request of Mr. Trump’s lawyers.

In late 2022, Mr. Bragg’s prosecutors won a conviction of the company, the Trump Organization, when a jury found the business guilty of multiple felonies related to a long-running tax fraud scheme. The company’s veteran chief financial officer, Allen H. Weisselberg, pleaded guilty in the scheme and is serving time at the Rikers Island jail complex.

A special counsel, Jack Smith, appointed by the Justice Department is conducting a criminal investigation into Mr. Trump’s handling of sensitive government documents after he left office.

For more than a year, Mr. Trump repeatedly resisted the federal government’s efforts — including a subpoena — to retrieve classified and sensitive documents still in his possession, according to government documents.

In August, acting on a court-approved search warrant, the F.B.I. descended on his Mar-a-Lago residence and club in Palm Beach, Fla., and discovered about 100 documents bearing classification markings.

The warrant used to justify the search detailed three criminal laws: the Espionage Act, which criminalizes the unauthorized retention of national security secrets; obstruction; and concealing or destroying government documents.

The search was prompted by the discovery that Mr. Trump had kept classified material related to the use of “clandestine human sources,” according to a redacted version of the affidavit used to obtain the warrant. There was also “probable cause to believe that evidence of obstruction will be found” at Mr. Trump’s house, prosecutors wrote.

The Justice Department has suggested that the classified materials stored at Mr. Trump’s residence were most likely concealed and moved as the government sought to recover them. It also disclosed that it had obtained evidence that Mr. Trump’s representatives falsely claimed all sensitive material had been returned.

The investigation drew renewed attention this month when lawyers for Mr. Trump lost their fight to prevent investigators from acquiring documents related to the legal work on the former president’s behalf by M. Evan Corcoran. The Trump team asserted attorney-client privilege in their attempt to hold on to the documents, but first the Federal District Court in Washington and than an appellate court ordered Mr. Corcoran to comply with the investigators’ demand.

Yet despite the recent court hearings, it still remains unclear precisely what crime the government believes might have been committed — or who, other than or in addition to Mr. Trump, might have committed it.

In a September lawsuit, the New York attorney general, Letitia James, accused Mr. Trump in a September lawsuit of lying to lenders and insurers by fraudulently overvaluing his assets by billions of dollars.

Ms. James is seeking to bar the Trumps, including his sons Donald Jr. and Eric and his older daughter, Ivanka, from running a business in New York again. She has already successfully requested that a judge appoint an independent monitor to oversee the Trump Organization’s use of its annual financial statements — in which, the attorney general says in her suit, the company overvalued its assets.

In January, a New York judge declined to dismiss the attorney general’s suit against Mr. Trump, increasing the likelihood that he will face a trial in the matter this fall.

Because Ms. James’s investigation is civil, she can sue Mr. Trump but she cannot file criminal charges. She could opt to pursue settlement negotiations in hopes of obtaining a swifter financial payout. But if she were to prevail at trial, a judge could impose steep financial penalties on Mr. Trump and restrict his business operations in New York.

Mr. Trump is also under scrutiny in Georgia, where a special grand jury recently concluded its investigation into whether the former president and his allies criminally interfered with the 2020 presidential election.

For now, the grand jury’s report on its findings remains largely secret, but its forewoman, Emily Kohrs, has said that indictments were recommended against more than a dozen people. Asked in an interview if those included Mr. Trump, she declined to answer directly, but said: “You’re not going to be shocked. It’s not rocket science.”

Fani T. Willis, the Fulton County district attorney who has led the investigation, will ultimately decide what charges to seek and then bring them before a regular grand jury. Her decision is expected by May.

Nearly 20 people known to have been named targets of the criminal investigation, as well as others, could face charges, including Rudolph W. Giuliani, Mr. Trump’s former personal lawyer, and David Shafer, the leader of the Georgia Republican Party.

Mr. Trump and his associates had numerous interactions with Georgia officials after the election, including a call in which he urged the secretary of state, Brad Raffensperger, to “find 11,780 votes,” the number he would have needed to overcome President Biden’s lead in the state.

Mr. Trump has assailed the proceedings in Georgia, and his lawyers recently referred to them as a “clown show.”

A few excerpts from the special grand jury report that a judge allowed to be released revealed that jurors unanimously rejected claims by Mr. Trump of widespread fraud in Georgia. “We wanted to make sure we put that in, because somehow that’s still a question,” Ms. Kohrs said.

A House committee investigating the Jan. 6 assault on the Capitol spent a year and a half examining the role that Mr. Trump and his allies played in his efforts to hold onto power after his electoral defeat in November 2020.

In December, the committee issued an 845-page report concluding that Mr. Trump and some of his associates had devised “a multipart plan to overturn the 2020 presidential election” and disclosing in exhaustive detail the events that led to the attack on the Capitol.

The panel also accused Mr. Trump of inciting insurrection and conspiracy to defraud the United States, among other federal crimes, and referred him and some of his allies to the Justice Department for possible prosecution.

The referrals were largely symbolic, but they sent a powerful signal that a bipartisan committee of Congress believed the former president had committed crimes.

Since November, Mr. Smith’s office has been conducting its own investigation into Mr. Trump’s attempts to overturn the election, building on months of work by other federal prosecutors in Washington who have also filed charges against nearly 1,000 people who took part in the storming of the Capitol on Jan. 6, 2021.

The special counsel’s office has focused its attention on a wide array of schemes that Mr. Trump and his allies used to try to stave off defeat, among them a plan to create false slates of pro-Trump electors in key swing states that were actually won by Mr. Biden. Prosecutors under Mr. Smith have also sought information about Mr. Trump’s main fund-raising operation after the election.

Reporting was contributed by Jonah E. Bromwich, Rebecca Davis O’Brien, Michael Rothfeld, Ed Shanahan and Ashley Wong.