Donald J. Trump took the witness stand on Monday in a packed New York courtroom in a trial that threatens the business empire underpinning his public persona as he kicks off another run for the White House.

The trial stems from a lawsuit brought by New York’s attorney general, Letitia James, which accuses Mr. Trump and other defendants, including his companies and his sons Donald Jr. and Eric, of inflating the value of assets to obtain favorable loans and insurance deals.

The judge, Arthur F. Engoron, ruled even before the trial began five weeks ago that Mr. Trump and the other defendants were liable for fraud. He will decide Mr. Trump’s punishment. Ms. James has asked that Mr. Trump pay $250 million and that he and his sons be permanently barred from running a business in New York.

Mr. Trump has denied all wrongdoing. His attorneys have argued that the assets had no objective value and that differing valuations are standard in real estate.

Here are five things we learned during Monday’s testimony:

The former president gave mixed messages about the financial valuations at the center of the case.

During Mr. Trump’s four hours on the stand, he acknowledged playing a role in preparing his financial statements, saying that he looked at them and occasionally had suggestions. He also continued to suggest that his assets were, in fact, undervalued in the statements.

But he also distanced himself from the documents, placing the blame instead on the former controller of the Trump Organization, Jeff McConney; Allen H. Weisselberg, its former chief financial officer; and his outside accountant Mazars USA.

Mr. Trump minimized the importance of the statements and said the banks paid little attention to them. He also touted the disclaimers on the documents, saying they made it clear that the financial statements were not to be implicitly trusted.

Mr. Trump is voluble, even explosive, in his off-the-cuff speech, and Justice Engoron had difficulty controlling the former president on the witness stand.

Early in his testimony, Justice Engoron instructed Mr. Trump to answer a question posed to him by the attorney general’s lawyer Kevin Wallace, telling him, “No speeches.” After the warning was ignored, Justice Engoron turned to Mr. Trump’s attorney, Christopher M. Kise, and asked him to control his client, adding, “This is not a political rally.”

From the witness stand, Mr. Trump said, “This is a very unfair trial. Very, very. And I hope the public is watching.”

New York’s attorney general, Ms. James, has emerged as a nemesis for the former president.

Walking into the courtroom Monday, Mr. Trump called Ms. James “racist,” and he continued to lash out at her from the witness stand. He labeled Ms. James, who was sitting in the first row of the audience, “a political hack” who had used this case in her effort to run for governor.

At one point, Mr. Trump said, “People don’t know how good a company I built,” and accused the attorney general’s office of trying to demean him, pointing directly at Ms. James.

After court, Ms. James said that Mr. Trump had tried to create distractions during his testimony, but she added that “the numbers don’t lie.”

Although Mr. Trump went after Ms. James and Justice Engoron, he avoided mentioning the judge’s staff, specifically the judge’s principal law clerk, Allison Greenfield.

He had previously attacked Ms. Greenfield for being a Democrat like the judge, and his attorneys have argued that the frequent communication on the bench between the judge and Ms. Greenfield is improper.

During the first week of the trial, Justice Engoron ordered Mr. Trump not to comment on members of his staff, and put similar restrictions on his lawyers. Mr. Trump has been fined $15,000 for violating that gag order.

On Friday, Mr. Trump’s attorneys argued gingerly against the gag order placed on them.

Mr. Kise called the gag order “restrictive,” leading Justice Engoron to respond, “I am 1,000 percent convinced that you don’t have any right or reasons to complain about my confidential communications.”

Mr. Trump’s lawyers indicated that they will ask for a mistrial in response to the gag order.

There is no court Tuesday, because it is Election Day.

On Wednesday, Mr. Trump’s daughter Ivanka will be the fourth and final Trump family member to testify. The attorney general’s office is then expected to rest its case.

Mr. Trump’s attorneys will then present a defense. They are expected to recall many witnesses who have already testified, including the defendants, and to call their own experts. On Monday, they said that they expect the trial to conclude by Dec. 15, a week earlier than expected.