Lawmakers seek to return National Guard soldiers to the Capitol after they were relocated to sleep in a parking garage.

A number of lawmakers expressed outrage on Thursday evening following news reports that the National Guard troops who had been mobilized to provide security for the inauguration of President Joseph R. Biden Jr. were told that they could no longer sleep inside the Capitol and were relocated on Thursday afternoon to the parking garage of the Thurgood Marshall Federal Judiciary Building nearby.

“This is unacceptable and must be fixed,” Senator Mark Kelly, Democrat of Arizona, wrote on Twitter. “I’ll be making my office available for any guardsmen who need it and encouraging others to do the same.” A number of other lawmakers, including Representative Alexandria Ocasio-Cortez, Democrat of New York and Senator Kyrsten Sinema, Democrat of Arizona, also offered their offices.

Two Guard soldiers, who spoke on the condition of anonymity, said that they had been given no explanation as to why they were being relocated early Thursday afternoon, and said that they were without electrical power, heat and adequate restroom facilities. One Guard soldier estimated that there were 1,000 of them sharing a single portable restroom stationed outside of the parking garage.

The two Guard soldiers said that their fellow troops were breathing in exhaust fumes because the garage at the Thurgood Marshall center was still in use as a parking facility; the soldiers there, they said, were from the National Guards of Maryland, Virginia, Tennessee and Alabama.

Asked for comment, a spokesman for the National Guard Bureau directed questions to the Washington, D.C., National Guard, which he said was in charge of living arrangements for the more than 20,000 Guard troops who had been providing security for the inauguration.

“As Congress is in session and increased foot traffic and business is being conducted, Capitol Police asked the troops to move their rest area outside of the Capitol,” said Capt. Edwin Nieves Jr., the spokesman for the Washington, D.C., National Guard. “They were temporarily relocated to the Thurgood Marshall Judicial Center garage with heat and restroom facilities.”

“We remain an agile and flexible force to provide for the safety and security of the Capitol and its surrounding areas,” he added.

The D.C. National Guard was not immediately able to say how many soldiers were being quartered in parking garages, nor how long they would be there and whether any additional portable restrooms would be made available to them.

On social media, some lawmakers said they were making efforts to move the troops back to the Capitol.

In a tweet, Senator Chris Murphy, Democrat of Connecticut, said that he had spoken to the acting chief of the Capitol Police about the issue.

A spokesman for the D.C. Guard did not immediately respond to a request Thursday night inquiring about the effort to move troops back into the Capitol.

Earlier in the week, 12 Guard soldiers were removed from their duties after officials discovered texts and social media posts that made threatening comments toward political officials.