National Guard personnel will fully depart the U.S. Capitol grounds this week, military and congressional officials said Monday, bringing an end to the security mission that began when armed troops were dispatched to help quell the attack by supporters of former president Donald Trump.

The National Guard was deployed Jan. 6 to help beat back a crowd of about 10,000 rioters who had besieged the building and clear out the approximately 800 who had broken inside. Why it took the National Guard more than three hours after the breach to arrive continues to be a matter of contentious discussion on Capitol Hill, where House lawmakers recently grilled Trump’s former acting defense secretary for details about that day.

“These airmen and soldiers protected not only the grounds, but the lawmakers working on those grounds, ensuring the people’s business could continue unabated,” Defense Secretary Lloyd Austin said in a statement. “They lived out in very tangible ways the oath they took to support and defend the Constitution.”

Though their mission formally ended Sunday, about 1,700 troops from nine states and Washington, D.C., remain in the District pending departures scheduled through Wednesday, according to Air Force Capt. Chelsi Johnson, a D.C. Guard spokesperson.

Guard members have been a constant fixture at the Capitol since the insurrection, numbering almost 26,000 ahead of President Biden’s inauguration. By the start of spring, that number fell to about 5,000 and has continued to dwindle as the threat of further violence has abated.

Armed troops have manned entry points to the Capitol campus and run patrols of the fenced-in grounds to buttress the Capitol Police force. Guard members also provided logistical support and helped facilitate communication for the throngs of federal authorities at the Capitol.

Deploying thousands of Guard members into the District within days of the inauguration came with some challenges. Early on, troops slept on floors inside the Capitol and congressional office buildings as the Pentagon scrambled to find proper accommodations. And a dozen Guard members were sent home after mass security screenings prompted concern that they could pose a threat, including two suspected of sympathizing with anti-government groups. Defense officials have declined to provide more information about those service members.

Image without a caption

In recent weeks, the Guard’s prolonged presence has also become a flash point for partisan sniping, as lawmakers argued about the costs of maintaining such a force — and split over whether the protracted armed lockdown of the Capitol campus remains necessary.

Speaking on CBS News’s “Face the Nation” on Sunday, retired Army Lt. Gen. Russel Honoré — who was tapped by House Speaker Nancy Pelosi (D-Calif.) to lead a security review of the Capitol grounds — signaled the Guard’s impending departure but warned it did not mean things at the Capitol would return to normal.

“One of the missions they will not be able to probably accomplish, as designated by both houses and all parties, is the open campus,” he said. “They will not be able to return immediately to the open campus where people can openly visit the Capitol because of the strain on the Capitol Police.”

Honoré’s recommendations suggested several investments in the Capitol Police, including adding 854 positions to help the force better process intelligence and build specialized expertise in riot control.

Many of those recommendations have been included in an emergency security spending bill that last week passed the House on the narrowest of margins, after all Republicans and a handful of Democrats withheld support.

The $1.9 billion legislation, which has yet to be considered in the Senate, commits nearly $800 million to hardening the Capitol by reinforcing doors and windows, adding security checkpoints and equipping Capitol Police officers with the weapons and training they need to guard the complex and its members from threats, in Washington and in their home districts.

It also dedicates over a half-billion dollars toward covering accrued expenses of the National Guard’s deployment.

On Monday, after meeting with members of the National Guard, Pelosi issued a statement thanking them for their service and urging the Senate to take up the spending bill and legislation to establish an independent commission to investigate the events of Jan. 6. The commission was approved in the House last week with the support of all Democrats and 35 Republicans.

“The Senate must act,” she said. “There is no time to waste or room for partisanship in keeping our Capitol and country safe.”

But Senate Minority Leader Mitch McConnell (R-Ky.), in a statement in which he too thanked the troops, promised only to “continue to discuss and debate whether it is appropriate for uniformed military personnel to play an ongoing role in policing the United States Capitol going forward.”

McConnell has declared his opposition to the commission legislation, a position that will make it challenging for Democrats to secure the 10 GOP votes needed to avoid a procedural Senate filibuster.

The commission legislation is expected to come up for a vote in the Senate as soon as Thursday.