National Guard troops remained in a supporting role during recent civil unrest in Washington and steps to prepare active-duty forces to deploy into the nation’s capital proved to be a precautionary measure, Defense Secretary Mark T. Esper and Gen. Mark A. Milley, chairman of the Joint Chiefs of Staff, said in a letter to Congress on Wednesday.

The Pentagon leaders addressed questions from Rep. Adam Smith (D-Wash.), chairman of the House Armed Services Committee, in a letter on Wednesday, a copy of which was obtained by The Washington Post.

The letter comes amid a showdown between Pentagon leadership and Democrats on the committee, who are pushing Esper and Milley to testify about the military’s role in responding to recent unrest triggered by the killing of George Floyd, a black man who died in police custody last month in Minnesota, and other instances of police brutality against African Americans.

It follows a scathing letter that Smith sent earlier in the day to Esper expressing his “profound frustration” that the Pentagon had not met a committee-imposed deadline to provide written answers to questions about Defense Department actions as thousands of law enforcement officers and National Guard fanned out across Washington.

The Pentagon leaders have come under intense scrutiny over the past week for appearing to back President Trump’s militarized response, including when they were seen in a photo op the president held near the White House on June 1 shortly after protesters were forcibly cleared from the area. High-profile retired military leaders also publicly chided Esper, Trump’s second defense secretary, for describing a need to “dominate the battlespace” in reference to cities experiencing unrest.

Jonathan Hoffman, the chief Pentagon spokesman, said in a statement earlier in the day that the department had already provided the House committee with answers to “most — if not all” of Smith’s questions during a briefing Monday by Army Secretary Ryan McCarthy and Maj. Gen. William Walker, who commands the D.C. National Guard.

In their letter to Smith, Esper and Milley said that active-duty forces “are not currently present and were not ever in the District for purposes of civilian law enforcement.”

But they confirmed that Trump could, if he chooses to invoke the 1807 Insurrection Act, use military forces for law enforcement purposes anywhere in the country. “In the event that a president makes such a decision, he may do so without approval from the state government in which the forces are to be used,” they said.

About 3,800 National Guard troops from states including Florida and Idaho were sent to Washington last week at Esper’s request. The Pentagon also put about 1,700 active-duty troops, including elements of the 82nd Airborne Division, on standby outside Washington. All outside forces have since left the Washington area.

Even as the Pentagon leaders grappled with the backlash over the use of military forces in response to protests, they also faced admonishment from the president as they counseled against steps that would further militarize the situation, including invoking that act.

Despite Trump’s statement as unrest mounted that Milley was “in charge,” the Pentagon leaders stated in their letter that he was not. “The role of the Chairman of the Joint Chiefs of Staff is to provide best military advice to the president,” they wrote.

In the letter, Milley and Esper reiterated Esper’s earlier statement that neither official intended to appear on camera with Trump as he held up a bible outside a historic church on Lafayette Square, across from the White House, shortly after protesters were cleared.

“We participated in the walk with the aim of observing damage in Lafayette Square and at St. Johns Church, and meeting with and thanking the National Guard members who were on duty,” they said.

Although National Guard forces under Defense Department command were present at the scene, they “did not actively participate in the clearing of Lafayette Park,” the officials said. They said Walker “did direct ‘support-to-civilian law enforcement’ actions of the D.C. National Guard.”

In response to a question from Smith about the 3rd U.S. Infantry Regiment, a ceremonial unit known as the “Old Guard” that provides presidential escorts and conducts military funeral honors, Esper and Milley said the unit had been placed on a “prepare to deploy” status but was never sent into Washington.

“At no point were any weapons loaded or made ready, but in preparation for potential operations in an increased readiness posture, the Old Guard Commander directed the issue of bayonets in scabbards and limited amounts of ammunition to be maintained in pouches,” they said.

The Old Guard, which is based across the Potomac River outside Washington, “has subsequently returned to its normal readiness posture and remains assigned to the U.S. Army Military District of Washington Commander.”

Smith on Wednesday also criticized the Pentagon leaders for failing to set a date to testify about recent events. “Without your cooperation, the committee will be forced to set a hearing date and time without your input,” he wrote.

Hoffman said that “the [House committee] staff is also well aware that we have been working on finding a mutually available date to testify soon.”

On Wednesday night, Monica Matoush, a spokeswoman for the committee leadership, said the panel had received the letter. “We look forward to scheduling a date and time to receive public testimony from the secretary of defense and the chairman of the Joint Chiefs of Staff,” she said.

Correction: A previous version of this article referred to Mark T. Esper as President Trump’s fourth secretary of defense. He is the second, after Jim Mattis. Patrick Shanahan and Richard V. Spencer were acting secretaries of defense.