WASHINGTON — While the nuclear agreement with Iran will not stop it from funding organizations the United States considers to be terrorist groups, the pact reduces the chances of a near-term military conflict between the two countries, the top American military leader, Gen. Martin E. Dempsey, told Congress on Wednesday.

Later in the day, President Obama hosted about 90 House Democrats at the White House for what he had hoped would be a lengthy back-and-forth about the Iran deal, but the lawmakers ended up leaving after just 30 minutes because a series of votes were rescheduled on legislation dealing with highway aid and veterans’ health.

General Dempsey, the chairman of the Joint Chiefs of Staff, told the Senate Armed Services Committee that the nuclear deal did not prevent the United States from striking Iranian facilities if officials decide that Tehran is cheating on the agreement. But if it sticks to the terms of the pact, such a strike — with attendant retaliation — is far less likely, he said.

In his trademark to-the-point style, General Dempsey answered a barrage of questions from Republican senators that appeared intended to make him criticize the pact. The general — appearing alongside Defense Secretary Ashton B. Carter, Energy Secretary Ernest J. Moniz, Secretary of State John Kerry and Treasury Secretary Jacob J. Lew — neither praised nor condemned the nuclear agreement.

Instead, he gave an assessment of both the potential and the limitations of the pact. “If followed, the deal addresses one critical and the most dangerous point of friction with the Iranian regime,” General Dempsey said. “But as I’ve stated repeatedly, there are at least five other malign activities which give us and our regional partners concern,” including the pursuit of ballistic missile technology, weapons trafficking, the use of surrogates and proxies, the use of naval mines, and undersea activity.

When Senator Roger Wicker, Republican of Mississippi, accused General Dempsey of “damning” the pact “with faint praise,” the general was again brief.

“First, Senator, I would ask you not to characterize my statement as tepid, nor enthusiastic, but rather pragmatic,” he said. “Relieving the risk of a nuclear conflict with Iran diplomatically is superior than trying to do that militarily.”

The three-hour hearing was the first chance that Senate Republicans who support a resolution of disapproval of the Iran pact have had to publicly question Mr. Obama’s top military officials on the deal. When Mr. Kerry, who along with Mr. Moniz negotiated the agreement, spoke, the hearing at times got antagonistic.

Toward the end, Mr. Kerry and Senator Ted Cruz, Republican of Texas, got into a heated exchange over whether Mr. Kerry should apologize to families of American military forces who were killed in Iraq by Shiite forces using weaponry provided by Iran.

Mr. Cruz, a presidential candidate, misquoted Mr. Kerry, saying the secretary of state had apologized to those families. Mr. Kerry corrected him, and Mr. Cruz then pressed Mr. Kerry about why he had not apologized to them.

At the White House, the Democratic lawmakers were given Champagne and soft drinks and were briefly entertained by a piano player before filing into the East Room around 4:30 p.m. to hear the president give an intensive 30-minute seminar on the details of the Iran agreement. Several cabinet members were in the audience.

The president promised that he would explain the details of the agreement to everyone in the room for as long as anyone wished, and he said he would get more detailed answers from others if any were needed.

“He is leaving no doubt that this is his top priority,” said Representative Jan Schakowsky of Illinois. “I’ve never seen anything like it, except maybe during the Affordable Care Act debate in 2010.”

The president’s message, lawmakers said, was the same as he has given elsewhere: While not perfect, the deal is better than any alternative.

Despite the abrupt end to the meeting, many in the room were persuaded, Ms. Schakowsky said.

“I feel very confident that we will have sufficient votes to sustain a veto,” she said.

A version of this article appears in print on , on Page A10 of the New York edition with the headline: Top General Gives ‘Pragmatic’ View of Iran Deal. Order Reprints | Today’s Paper | Subscribe