A gunman opened fire on a Republican congressional baseball team as it practiced on a suburban Washington, D.C., field Wednesday — wounding House Majority Whip Steve Scalise of Louisiana and three others — before police killed him in a shootout, authorities said.

Lawmakers at the practice later described Scalise dragging himself across the field seeking safety after being shot near second base.

“It was just surreal to hear the first bang, and you think, ‘That sure sounds like a shot.’ And then boom, boom, boom right after it, there’s three more,” said Rep. Joe Barton (R-Texas), the captain of the team. “There was shooting for at least 10 minutes.”

Scalise was listed in critical condition after surgery for a gunshot wound to his hip, and a lobbyist, legislative aide and U.S. Capitol Police officer hit by bullets as the gunman peppered the field with his rifle also were taken to local hospitals.

The FBI identified the shooter as James T. Hodgkinson, 66, of Belleville, Illinois. The Associated Press said he had posted anti-Trump sentiments on social media and belonged to a Facebook group called “Terminate the Republican Party.”

On Wednesday night, President Donald Trump and first lady Melania Trump paid a surprise visit to Scalise at MedStar Washington Hospital Center, bringing him flowers.

advertisement | advertise on newsday

They also met with Scalise’s doctors and spoke with his wife Jennifer, said White House Press Secretary Sean Spicer.

Afterward in a tweet, Trump asked for prayers for Scalise, adding that the congressman is in “very tough shape — but he is a real fighter.”

Barton and others said the casualties could have been much worse if Scalise had not been accompanied by his security detail, provided by the U.S. Capitol Police to him as a member of the House Republican leadership. Those agents went directly after the shooter after the first shots.

Officials with the hospital said Scalise would require additional surgeries.

“The bullet travelled across his pelvis, fracturing bones, injuring internal organs, and causing severe bleeding,” the hospital said in a statement Wednesday night.

U.S. Capitol Police said Special Agent Crystal Griner was hospitalized in good condition after being shot in the ankle and Special Agent David Bailey was treated for a minor injury and released. Special Agent Henry Cabrera also took part.

The first couple met with Griner and her wife and brought a bouquet of flowers.

One other lawmaker was injured. Rep. Roger Williams (R-Texas) twisted his ankle.

Tim Slater, the FBI special agent in charge of the Washington Field Office, in an evening news conference said Hodgkinson was shot several times in the torso by members of “multiple local agencies.”

Slater said that since March, Hodgkinson had been in Alexandria, Virginia, where the shooting took place, living out of a white cargo van. He said the FBI is investigating his “associates, whereabouts, social media impressions and potential motivations.”

advertisement | advertise on newsday

The Bureau of Alcohol, Tobacco, Firearms and Explosives also is running a trace on a rifle and a handgun, the FBI said.

The unexpected assault shook Washington, prompting House leaders to cancel all votes for the day and Trump to postpone his public events.

Sen. Bernie Sanders (I-Vt.), who ran unsuccessfully for the Democratic nomination last year, said on the Senate floor that the suspect “apparently volunteered on my presidential campaign” but added, “I am sickened by this despicable act.”

Sanders said, “Let me be as clear as I can be. Violence of any kind is unacceptable in our society and I condemn this action in the strongest possible terms.”

The shooting, and its possible political motivation, left many on Capitol Hill shaken and reflective, as they spoke of the need for toning down rhetoric and expressed concern for their own safety, especially back home in their states.

advertisement | advertise on newsday

Trump, who announced the shooter’s death, said, “We are strongest when we are unified and when we work together for the common good,” he said.

House Speaker Paul Ryan (R-Wis.) asked members in an address to a packed chamber “to come together, to lift each other up and to show the country, to show the world, that we are one House . . . united in our humanity.”

House Minority Leader Nancy Pelosi (D-Calif.) endorsed Ryan’s statement, and Senate Majority Leader Mitch McConnell (R-Ky.) and Senate Minority Leader Chuck Schumer (D-N.Y.) sent prayers to the victims and their families and thanked the U.S. Capitol Police.

Rep. Tom Suozzi of Glen Cove, a member of the Democratic baseball team, said they were practicing at a different ballfield miles away when the players learned of the shooting and law enforcement officials moved them to the dugout. There the Democrats decided to pray for their Republican colleagues.

“It was sad, it was scary, it was a little overwhelming,” Suozzi said. “And then it was really very spontaneous, we all gathered in a circle and said a prayer.”

The U.S. Capitol Police and Alexandria Police Department said they received reports at 7:09 a.m. of shots fired at Eugene Simpson baseball park in Alexandria, about a half an hour away from the Capitol building.

Alexandria police responded within three minutes and joined the U.S. Capitol Police in firing on the shooter, Police Chief Michael Brown said at a news conference.

Barton said 20 congressmen, two senators, some staff and others, and his two sons were at the practice for the annual congressional charity game against Democrats at Nationals Park scheduled for Thursday night.

In CNN interviews, Scalise’s fellow lawmakers and teammates described a harrowing scene with bullets flying and teammates diving for cover. Some were emotional.

It began as a routine day “that turned into a nightmare,” said Rep. Chuck Fleischmann (R-Tenn.). “I’m not sure I’ll ever feel safe on the field again.”

Williams tweeted that his legislative correspondent Zachary Bart was shot and “receiving medical attention but is doing well and is expected to make a full recovery.”

Tyson Foods said Matt Mika, director of government relations in Washington, D.C., also was shot. A company spokesman said it was “awaiting word on his condition.”

Rep. Jeff Duncan (R-S.C.) said as he was preparing to leave practice early a man approached him and asked: “Excuse me, sir, who’s practicing today? Democrats or Republicans?” Duncan said he replied Republicans, and the man thanked him and turned around.

Duncan said he left the field at 7:02 a.m. and had no idea there had been a shooting. But based on photos he’s seen, Duncan said he has no doubt the man he spoke with was the shooter.

Spicer said that Trump does not plan to attend the congressional baseball game out of security and logistical concerns.

“While the president would like to attend the game and show his support for all of these brave public servants,” Spicer said, “he has been advised that there is not enough time to follow Secret Service protocols.”

With Emily Ngo, William Murphy and Lisa Irizarry.

CORRECTION: The number of people shot was incorrect in earlier versions of this story because of inaccurate information provided by authorities.