The two members of the Capitol Police who were injured while engaging the gunman who opened fire on a Republican congressional baseball practice were being heralded as heroes on Wednesday.

Identifying the officers as David Bailey and Crystal Griner, House Speaker Paul Ryan and House Minority Leader Nancy Pelosi offered their thanks to the pair and the entire Capitol Police.

“I spoke with Special Agent Bailey and Special Agent Griner this morning,” Ryan told his colleagues on the House floor. “One was being treated and one was about to go into surgery. I expressed our profound gratitude to them. It is clear to me, based on various eyewitness accounts, that without these two heroes, Agent Bailey and Agent Griner, many lives would have been lost.”

According to witnesses on the scene, Griner and Bailey had been posted behind the first base dugout of Eugene Simpson Stadium Park — where the Republican congressmen were practicing a day ahead of a scheduled game against their Democratic colleagues — when the shooting started.

The shooter, identified as James Hodgkinson of Belleville, Illinois, ducked behind the third base dugout and exchanged gunfire with the two members of the Capitol Police. He made his way up to a utility shed by home plate when he was shot. Witnesses estimated that more than 50 shots rang out.

“How fortunate we were that they were on the scene because their lives would have probably been lost,” Pelosi told members of Congress gathered in the Capitol Building “I want us to remember that every single day the Capitol Police protects all of us, takes risk for us.”

David Bailey Courtesy Kenneth Branson

Griner remained in good condition in the hospital after being shot in the ankle, and Bailey was treated and released after sustaining a minor non-gunshot wound injury during the chaos.

Most members of Congress are not given a security detail but Bailey and Griner had been assigned to House Majority Whip Steve Scalise because he in a leadership position.

“The United States Capitol Police is dedicated to its mission to protect the U.S. Capitol, Members of Congress, staff and the visiting public, and today we saw how our officers’ extensive training and quick response saved lives," Capitol Police Chief Matthew Verderosa said in a statement.

Multiple members of Congress have credited the two officers with keeping the incident from becoming a mass murder.

Capitol Police Officer Crystal Griner, right, walks behind House Majority Whip Steve Scalise, middle, on Nov. 15, 2016. Andrew Harnik / AP

These folks are heroes,” said Rep. Chuck Fleischmann, who witnessed the incident. “I don’t know who they were personally because this was part of Whip Scalise’s detail, but for the fact that they were there the carnage would have been worse.”

Sen. Rand Paul, who said he was in a batting cage at the time said the police prevented a massacre.

“Everybody probably would have died except for the fact that the Capitol Hill police were there and the only reason they were there is because we had a member of leadership on our team," Paul told MSNBC. "If Scalise wouldn’t have been on the team, unfortunately he was hit and I hope he does well, but also by him being there he probably saved everybody else’s life."

“Had they not been there it would have been a massacre," he added. "There's no escaping a guy with a, you know, he had several hundred bullets and we no weapons and no place to hide."

Scalise was shot in the hip during the assault and remained in critical condition on Wednesday evening.

According to a statement from his office, he remained “in good spirits" prior to surgery at Medstar Washington Hospital Center. He shared his thanks for the Capitol Police and the other first responders.

President Donald Trump shared that sentiment in a statement he gave to reporters Wednesday.

"Many lives would have been lost if not for the heroic actions of the two Capitol Police officers who took down the gunman despite sustaining gunshot wounds during a very, very brutal assault," Trump said. "Melania and I are grateful for their heroism and praying for the swift recovery of all victims."