WASHINGTON — Senators from both parties agreed on Tuesday that it was long past time for Congress to enact a new law authorizing the evolving war against Islamist terrorist groups, while also raising questions about the legal basis for the Trump administration’s escalating direct military confrontations with Syrian government forces.

But over the course of a 90-minute hearing before the Foreign Relations Committee, it was clear that policy disagreements that thwarted previous efforts to update the authorization to use military force against the perpetrators of the Sept. 11, 2001, attacks — a law that three presidents have used to justify combat against foes and in countries far beyond Al Qaeda in Afghanistan — remained daunting.

“Some members of Congress will use this debate for the singular purpose of imposing limitations on our president — it’s just a fact,” said Senator Bob Corker, Republican of Tennessee, the chairman of the committee. “Others may refuse to limit a president at war in any way. That’s a fact. And that is a wide gap to bridge.”

The hearing was the latest in a yearslong series of congressional debates over what, if anything, to do about the open-ended Sept. 11 war authorization. The executive branch has stretched the law to encompass war against enemies with only tenuous links to the original Al Qaeda, which has proved controversial, and senators disagreed Tuesday about whether it covered the Islamic State, as the Obama administration first claimed.

The hearing was the first since President Trump took office, and it comes at a time of new urgency over the legal uncertainty regarding the scope and limits of what it covers. On Sunday, the United States shot down a Syrian government fighter jet because it was said to be menacing a rebel militia the United States is supporting. The downing prompted Russia, a Syrian government ally that has also intervened in the complex civil war, to threaten to target American and allied aircraft that fly west of the Euphrates River.

Asked at a luncheon on Monday at the National Press Club in Washington what legal basis the United States had to attack Syrian government forces, the chairman of the Joint Chiefs of Staff, Gen. Joseph F. Dunford Jr., claimed the authority stemmed from the 2001 law because the American military presence in Syria was predicated on fighting Al Qaeda and the Islamic State there.

But on Tuesday, the ranking Democrat on the Senate committee, Senator Benjamin L. Cardin of Maryland, said, “The most recent use of this, in regards to activities in Syria, certainly had nothing to do with the attack on our country on September the 11th.”

And a witness, John B. Bellinger III, who was the Bush administration’s top lawyer at the National Security Council and then at the State Department, testified that he was “puzzled” by the suggestion that the 2001 war authorization covered military operations against Syrian government forces. He suggested the executive branch might be able to cite Mr. Trump’s constitutional powers as commander in chief as a basis for them, however.

Most of the hearing focused on how operations against Islamist militants have evolved since 2001. It circled through questions that have derailed previous attempts to reach a consensus on updating the war authorization, including whether a replacement should have an expiration date, constrain the use of ground forces or limit the war’s geographic scope, and how broadly it should extend to other militant groups merely associated with major enemies.

“It’s hard to craft an authorization against nonstate actors,” said Senator Tim Kaine, Democrat of Virginia, who, with a fellow committee member, Senator Jeff Flake, Republican of Arizona, has pushed Congress for years to enact a new war authorization.

Still, in an interview after the hearing, Mr. Kaine expressed hope that political headwinds might be easing.

“In my discussions with Republicans and Democrats, I do think they do feel the need to impose more structure on the White House,” Mr. Kaine said, noting that Mr. Trump had outsourced a decision about troop levels in Afghanistan to the Pentagon and had yet to articulate a clear Middle East strategy. “I think the worry about mercurial surprises is prompting Congress, including Republicans, to want to exercise our powers a little more.”

The bill proposed by Mr. Kaine and Mr. Flake would authorize force against Al Qaeda, the Taliban and the Islamic State for five years. It would also set up a process for presidents to declare that other Islamist militant groups had become “associated forces” covered by the war authorization while giving Congress a way to reject that designation.

One of several alternative bills, proposed by Senator Todd Young, Republican of Indiana, contains no end date or mechanism for Congress to override an executive branch decision about expanding the war to an associated force. His bill also contains explicit permission to hold terrorism suspects, including from the Islamic State, in indefinite law-of-war detention, bolstering court rulings that wartime detention powers are implied as part of congressional authorization to use military force.