Sens. Patrick Leahy, D-Vt., and Richard Shelby, R-Alaska, on Tuesday reached an agreement on a $2 billion bill that will provide new funding for Capitol Police less than seven months after the Jan. 6 insurrection.

The bill provides $100 million to Capitol Police and $300 million to improve security around the building.

“We’re going to take care of the Capitol Police and fix some of the problems that need to be done here. Certainly, take care of the National Guard,” Leahy said “Both sides had to compromise on things, but I think we’re in pretty good shape,” he added.

“I am pleased this legislation sticks to immediate security needs, as I have long advocated. I urge my colleagues to support this important legislation,” Shelby said. “It is essential we provide the National Guard and Capitol Police the funding they require without further delay.”

The deal will also give $1 billion to the Pentagon, $500 million to the National Guard to fund the Afghan visa program for those who assisted the U.S. military during the Afghanistan war, $600 million for that same program in the State Department and $25 million for the Department of Health and Human Services Offices of Refugee Resettlement.

Leahy had warned lawmakers if Congress did not act quickly to clear the emergency cash, Capitol Police salaries would have been depleted by next month and the National Guard would have had to cut training.

Officials have been debating for months over funding to plug security gaps the insurrection rioters exposed. Any deal that was to pass the Senate may reach an impasse in the House. Three House Democrats who voted against the measure this spring complained the bill did not do enough to provide counseling and treatment for staff.

House Majority Leader Steny Hoyer said the House could take up the bill later this week as long as the Senate moves quickly.

“If they pass it tomorrow we’ll pass it here,” Hoyer said.