WASHINGTON — On Monday, a constellation of lobbyists for Saudi Arabia, which has spent more than $5 million this past year to buy influence in Washington, called a crisis meeting to try to stop legislation allowing the families of victims of the Sept. 11 attacks to sue the Saudi government for any role in the plot.

On Tuesday, the 9/11 families, represented in their multibillion-dollar lawsuits by lawyers including Jack Quinn, a former White House counsel with deep relationships in Washington, demonstrated outside the White House to pressure President Obama not to veto the legislation, as he has vowed to do.

On Wednesday, these two powerful forces, one operating in the shadows and the other more in the open, converged on Capitol Hill in the culmination of one of the biggest and most emotional lobbying fights of the year. The battle is a reflection of the enduring dominance in Washington of the 9/11 families and the diminishing clout here of Saudi Arabia, which once advanced its agenda unencumbered in the West Wing and corridors of Congress.

The four-page bill, known as the Justice Against Sponsors of Terrorism Act, unanimously passed the House and Senate, and it has major national security and diplomatic consequences for the United States. It would alter a 1976 law giving other countries immunity from lawsuits in the United States and force them to face federal lawsuits if they are found to have played a role in a terrorist attack that kills Americans on United States soil.