WASHINGTON — A gunman acted alone when he shot and wounded a top House Republican and four other people on a northern Virginia baseball field, the FBI said Wednesday.

Tim Slater, the special agent in charge of the Washington FBI office, also said during a news conference that James T. Hodgkinson did not have any ties to terrorism.

Rep. Steve Scalise, the House majority whip, was gravely wounded in the shooting last week. He has undergone several surgeries and remains hospitalized. His condition has been upgraded to serious.

Scalise and other congressional Republicans were practicing for their annual charity baseball game against Democrats when a gunman started shooting.

Related: Congressional Baseball Gunman Had List of GOP Lawmakers' Names

U.S. Capitol Police and other officers returned fire and killed the gunman, who turned out to be an unemployed home inspector with a deep animus toward President Donald Trump and other Republicans.

The gunman was identified as Hodgkinson, 66, from Belleville, Illinois, who volunteered for Bernie Sanders' presidential campaign. He was taken to a hospital, where he died of his injuries.

The FBI said in a statement the agency is actively investigating him to look at his associates, whereabouts and any activity on social media. Officials also are running a trace on two weapons, including a rifle and a handgun.

A female police officer with less than 2 years' experience withstood a barrage of gunfire from the gunman.

Alexandria Police Chief Michael Brown lauded the heroic actions of Officer Nicole Battaglia and two other officers who were the first to arrive at a field where GOP congressmen were practicing for the game.

Officers were first dispatched to the scene at 7:10 a.m. June 14, Brown said, and Officer Kevin Jobe, a 16-year Alexandria police veteran, arrived less than two minutes later. Battaglia and another officer, Alexander Jensen, arrived around the same time.