WASHINGTON — House Majority Whip Steve Scalise was among five people wounded Wednesday morning when a rifle-wielding gunman opened fire during a congressional baseball practice in Alexandria, Virginia.

The Republican lawmaker was standing at second base when he was hit in the left hip amid a flurry of bullets, witnesses said. After dragging himself to safety and getting help from his GOP colleagues caught in the chaos, Scalise was transported to MedStar Washington Hospital Center in Washington, D.C.

He underwent surgery and was in critical condition, the hospital said Wednesday afternoon, adding that another victim was in good condition.

"Prior to entering surgery, the Whip was in good spirits and spoke to his wife by phone," Scalise's office said in a statement. "He is grateful for the brave actions of U.S. Capitol Police, first responders, and colleagues."

Among the latest details in the attack:

Federal law enforcement officials identified the suspected shooter to NBC News as James T. Hodgkinson, 66, of Belleville, Illinois. Trump announced during an update from the White House that the suspect died after being taken to the hospital.

Trump said "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."

He added that Scalise is a "patriot and he's a fighter."

"He will recover from this assault," Trump said, "and Steve, I want you to know that you have the prayers not only of the entire city behind you, but of an entire nation, and frankly, the entire world."

Sen. Rand Paul of Kentucky, who was at the batting cages at the field, told MSNBC that Scalise — as the third highest-ranking Republican member of the House — always has Capitol Police with him as security detail. Scalise, 51, has represented Louisiana's 1st District since 2008.

Paul described the confusion that broke out unexpectedly — about an hour after some 20 GOP lawmakers arrived to the baseball diamond for what started out as a typical practice.

"There was a rapid succession of shots, you know five or 10 shots," Paul said. "In the field, I see Rep. Scalise is shot but moving, and he’s trying to drag himself through the dirt and out into the outfield."

"I probably heard 50 to 60 shots," Rand added. "Then finally we heard the response from the Capitol Hill police."

Witnesses told law enforcement that when the gunman arrived at the ball field, he asked people "are these the Republicans or the Democrats" practicing, officials added. The inquiry is raising questions about a possible political motivation.

Two Capitol Police officers were also wounded in the incident and their injuries were not considered life-threatening.

House Speaker Paul Ryan from the House floor confirmed the officers' identities as Krystal Griner and David Bailey: "We are, as ever, awed by the tremendous bravery of the Capitol Police."

Ryan also said of Scalise's shooting: "An attack on one of us is an attack on all of us."

A statement from Congressman Roger Williams' office said the Texas Republican was not wounded, but a member of his staff — identified as legislative correspondent Zack Barth — was shot and taken to the hospital.

A family friend later told NBC News that Barth was treated at the hospital for a gunshot wound to his calf, and then was released. The friend added that Barth said the gunman pointed his weapon straight at him.

In addition, Tyson Foods said employee Matt Mika, a director of government relations in the company's D.C. office and a former congressional staffer, was shot and taken to the hospital. His condition was not immediately known.

Alexandria Police Chief Michael Brown said five people were taken to local hospitals, including the suspect, following the shooting, which began shortly after 7 a.m.

A spokeswoman for George Washington Hospital said two patients were brought to the facility and listed in critical condition, but declined further comment.

Brown said Alexandria police officers arrived at the scene within three minutes of the first 911 call. Along with Capitol Police, they returned gunfire with the suspect.

Multiple law enforcement officials with knowledge of the investigation told NBC News that there was no immediate indication that the shooter had ties to international terrorism.

The Bureau of Alcohol, Tobacco, Firearms and Explosives said one rifle and handgun were recovered from the scene. Officials were trying to trace the ownership and purchase history of the two firearms, law enforcement sources told NBC News.

Timothy Slater, the special agent in charge of the Criminal Division at the FBI's Washington Field Office, told reporters that the suspect's motives remained under investigation.

"It's too early to say if (GOP lawmakers) were targeted intentionally or not," Slater added.

Both Democratic and GOP members of the House and Senate have been using the baseball field each morning in Alexandria's Del Ray neighborhood — about seven miles from D.C. — in preparation for a bipartisan charity game held annually and scheduled for Thursday. The Democrats had reportedly practiced earlier in the morning. Thursday's game was supposed to honor the victims of recent terror attacks in Manchester and London.

Sen. Jeff Flake of Arizona, a center fielder on the GOP's baseball team, said he was standing along the first base line when gunfire erupted. He took cover in the dugout, where he helped a congressional staffer who had been shot in the leg near center field. He estimated at least 50 shots were fired as well.

The shooter "could have fired into the dugout," Flake told MSNBC. "We had somebody yell after about 10 minutes, 'Shooter's down!' And so, I sprinted out to Steve and put pressure on the wound."

Flake said he used part of a jersey to suppress the bleeding.

"He was coherent. He was asking for water," Flake said of his colleague. "He was bleeding quite a bit."

Rep. Brad Wenstrup of Ohio, a doctor, was at the practice and helped treat the victims, Flake said.

Another congressman, Rep. Mo Brooks of Alabama, used his belt as a tourniquet on one of the victim’s legs, the senator added.

Several lawmakers at the scene, including Rep. Steve Pearce of New Mexico, tweeted that they were safe.

The ATF and FBI were at the shooting scene to assist in the investigation.

Local residents told NBC News that the volley of gunfire rang out at the ball field at Eugene Simpson Stadium Park, which includes a soccer field and dog run, and neighbors a YMCA. Children were walking to a school approximately a block away.

Stuart Claggett, who was walking his dog near the fields, said he heard the shots go off "like fireworks."

"They were fairly loud, but it wasn't like a machine gun. It stopped for a tiny amount of time," Claggett said.

He added that "some people might know that's where (members of Congress) play" baseball.

Leonard Crook said he was working out on the main floor of the YMCA, about 50 yards from the ball field, when a woman was frantically banging on the door of the facility, trying to get in.

"Some bullets hit the Y, so we went into the basement and everyone stayed there until everything blew over. We were locked down in the Y and not allowed to go anywhere," Crook said.

Trump released a statement after being briefed on the shooting and canceled his planned remarks at the Department of Labor for later Wednesday.

The Capitol Police said that "out of an abundance of caution" they "deployed a robust police presence throughout the Capitol Complex," although all buildings remained open.

Alex Moe, Hallie Jackson and Pete Williams reported from Washington, and Erik Ortiz, Tom Winter, Jonathan Dienst and Ariana Brockington reported from New York. Andrew Blankstein reported from Los Angeles.