Eric and Donald J. Trump Jr., the elder sons of the 45th president, stepped out of their father’s shadow and into a legal minefield on Thursday, tiptoeing around potentially damaging evidence as they testified in a trial that threatens their family business.

Donald Trump Jr. was mostly calm but often evasive as he blamed outside accountants for any errors in company financial statements during nearly two hours on the stand. The documents are at the heart of the civil case in State Supreme Court in Manhattan that accuses the brothers, their father and the firm of defrauding banks and insurers.

His younger brother, Eric, who now runs the Trump Organization, was more precise in his answers but more combative in his tone. He acknowledged his central role within the company but denied direct involvement with the documents.

At one point, Eric Trump erupted in anger at questioning from a lawyer with the New York attorney general’s office about whether he was aware of the financial statements in question. He replied that it should be assumed that a business of that size would have had financial statements.

“We’re a major organization, a massive real estate organization!” he exclaimed.

Mr. Trump’s sons were summoned to the stand by the office of the attorney general, Letitia James, which sued the Trumps and the Trump Organization, accusing them of overvaluing the former president’s assets to obtain favorable loans and other benefits.

Just before the trial began, the judge overseeing it ruled that the Trumps had indeed fraudulently manipulated financial statements sent to banks and insurers. The trial will determine what consequences they might face.

The sons’ testimony, which came a full month into the trial, kicked off a parade of Trump family members to the witness stand. Their sister, Ivanka Trump, who was the heir apparent to the business before joining her father in the White House, is scheduled to testify next week.

The former president himself is expected to take the stand Monday, a highly anticipated moment with widespread implications not only for the case but also his image as a businessman and his latest run for the White House. If Mr. Trump, his sons and company are found liable, they might have to pay a $250 million fine and could be permanently barred from running a business in New York.

The former president has been in and around the courtroom intermittently throughout the trial. The judge, Arthur F. Engoron, last week ordered him to testify at an impromptu hearing about whether the former president violated a gag order by criticizing the judge’s law clerk. Justice Engoron found that Mr. Trump’s testimony was “not credible” and fined him $10,000.

The fraud case stands apart from the former president’s other legal entanglements, which include four criminal indictments. It is a civil case and there is no jury, leaving Justice Engoron to determine the outcome. Although Mr. Trump and his sons could have asserted their Fifth Amendment right against answering questions, doing so would have been risky: In a civil case, a jury or judge is allowed to draw negative conclusions from a defendant’s refusal to testify.

When Mr. Trump ascended to the presidency in 2017, he handed over the company to his eldest sons — known to some within the Trump Organization as “the boys.” While Eric and Donald Trump Jr. inherited a company with a growing global footprint, they were also saddled with its legal woes.

For the elder Mr. Trump, the civil case is personal. Ms. James has assembled a mountain of evidence challenging something close to the former president’s heart and ego: his net worth.

During Thursday’s testimony, Ms. James’s office homed in on Eric and Donald Trump Jr.’s role in their father’s annual financial statements, which assigned values to his key properties. Donald Trump Jr. each year signed letters attesting to their accuracy, and the attorney general has argued that Eric Trump influenced some of the values contained in them.

Colleen Faherty, a lawyer with the attorney general’s office, elicited several pieces of useful testimony from Donald Trump Jr. about the statements. He acknowledged that he had expected the company’s biggest lender, Deutsche Bank, to rely on the accuracy of the financial statements.

She pressed further, needing to show that the statements were “material” — in layman’s terms, that they made a difference — and that the defendants intended to commit fraud.

Once Ms. Faherty’s questions began to include the words “intend” or “intended,” Mr. Trump grew cautious. When asked whether he intended for Deutsche Bank to rely on the documents, he did not answer directly. Instead, he said that bankers do their own due diligence.

Ms. Faherty also confronted Donald Trump Jr. with an email exchange showing that Forbes Magazine had alerted him to errors in statements that had been submitted to banks and insurance companies. A reporter raised questions about, among other things, the actual size of his father’s triplex apartment in Trump Tower.

Mr. Trump wrote of the questions: “Insane amount of stuff in there.”

Shortly after learning of Forbes’s concerns about the documents, he nonetheless told his outside accounting firm, Mazars USA, that they contained no material misstatements.

Mr. Trump dismissed the letter to Mazars as a “cover your butt” communication — and sought to pin any faulty valuations on the accounting firm.

“Every decision I made was based on all the financial information I would have gotten from Mazars,” he said in one of the day’s tensest moments, his voice speeding up. After the judge objected to the pace, Donald Trump Jr. told him that he would try to slow down.

The testimony revealed the contrasting personalities of the Trump sons — and their different roles at their father’s company. While Donald Trump Jr. took up his father’s polarizing political warfare, Eric seized the company’s reins, becoming its de facto chief executive and the new face of its operations.

Yet Eric, who was crisper on the stand, also distanced himself from the financial statements and, like his brother, pointed at Mazars.

“I never worked on the statement of financial condition,” he said.

Andrew Amer, another lawyer on the attorney general’s team, spent much of the hourlong examination trying to disprove that claim. He showed, for example, that Eric Trump was likely to have been aware of the statements while working on a golf club deal a decade ago in North Carolina.

Toward the end of the day, Mr. Amer also drilled down on the value of the family’s golf club in Westchester County, N.Y., seeking to show that Eric Trump had ignored an independent appraisal when advising an employee on how much the property was worth.

Mr. Trump disputed that he paid much attention to appraisals, despite Mr. Amer’s showing several emails in which he had corresponded with an appraiser about appraisals.

“I’m an operator. I’m a construction guy,” Mr. Trump said, sounding irritated. “I build projects. I don’t focus on appraisals.”

The testimony was combative throughout, a stark contrast from his brother, who appeared to take his stint on the stand in stride. At one point, Donald Trump Jr. told a courtroom sketch artist to “make me look sexy,” the artist told reporters.

If Donald Trump Jr. and Ms. Faherty were playing a friendly game of checkers, Eric Trump and Mr. Amer were locked in a chess match.

Mr. Amer seemed to think he had gotten the upper hand. In the closing moments of the day, he made a point of telling the courtroom that Eric Trump’s testimony was “great” and “favorable to our case.”

Kate Christobek and Susanne Craig contributed reporting.