An anti-Trump zealot opened fire on the congressional GOP baseball team’s practice Wednesday morning — hitting Whip Steve Scalise and three others before he was killed by cops.

James Hodgkinson, 66, showed up at the Eugene Simpson Stadium Park in Alexandria, Va., at around 7 a.m. and asked Rep. Jeff Duncan (R-SC) whether “Democrats or Republicans” were practicing on the field

Duncan said he told the man, whom he later identified from photos as the shooter, that it was the Republican team.

“He said, ‘OK, thanks.’ [He] turned around,” Duncan said. “I got into the car and left, to find out my . . . colleagues were targeted by the active shooter.”

Hodgkinson, armed with a semiautomatic rifle and a handgun, sprayed at least 50 rounds at the field from behind the third-base dugout, turning the laid-back practice for a charity baseball game into a scene of horror.

After 10 terrifying minutes, Hodgkinson, an Illinois man who had raged about Republicans on Facebook and volunteered for Bernie Sanders’ campaign, was wounded in a gunfight with two Capitol Police officers and later died. Both cops were injured.

Scalise (R-La.), the House majority whip, was struck in the hip, but was able to drag himself about 15 yards on the ground from his position at second base to the outfield.

He was in critical condition after undergoing surgery at MedStar Washington Hospital Center.

“There was a rapid succession of shots, you know, five or 10 shots,” Sen. Rand Paul (R-Ky.) said on MSNBC. “In the field, I see Representative Scalise is shot but moving, and he’s trying to drag himself through the dirt and out into the outfield.”

Others scrambled for cover, hiding behind trees and cars as bullets flew.

“I heard a loud bang. It sounded like a car backfiring,” said Daniel Harder, 28, a legislative director for Rep. Mike Bishop (R-Mich.) and one of about two dozen people at the field. “I exited the field along the first-base line and took cover behind an SUV. Once I saw the shooter in front of me, I got into the SUV and got into the back seat.”

Two Capitol Police officers, who were there protecting Scalise, the third-ranking Republican in the House, were lauded for their quick reaction.

“I saw one of the security detailees go down and then get back up and continue fighting,” Harder said.

Paul said the officers, Crystal Griner and David Bailey, prevented “a massacre,” adding, “There’s no escaping a guy . . . if he’s got several hundred bullets and we had no weapons and no place to hide.”

After the shooter went down, Scalise’s teammates, including Sen. Jeff Flake of Arizona, rushed onto the field to give him aid.

“Immediately after the gunfire stopped, Flake ran onto the field and began to apply pressure on Congressman Steve Scalise’s wound,” the senator’s office said in a statement. “After medical personnel arrived, Flake retrieved Scalise’s phone and made the first call to Scalise’s wife to notify her of the shooting.”

Rep. Brad Wenstrup (R-Ohio) said Scalise was conscious and “as brave as he could possibly be.”

Harder said he was touched by the dedication shown by Scalise’s security detail, particularly one officer who was more concerned about the congressman than his own injuries.

“He called him by his code name,” Harder said. “He just said: ‘I need to go be with Tiger. I need to go be with Tiger.’ That was just a surreal moment for me and a true testament to the heroism of the security details.”

Tyson Foods lobbyist Matt Mika also was shot and was in critical condition, while wounded congressional staffer Zachary Barth wrote on Facebook from hospital that he was doing “okay.”

Mika was struck on the field but managed to move about 100 feet to safety. “He was limping and went down,” Harder said. “Got back up. Went down, got back up and just continued moving.”

Barth gave a thumbs-up as he was being taken away on a stretcher,” the legislative director added.

Bailey was in “good condition” after being shot in the ankle; Griner sustained a minor injury.

“Many lives would have been lost if not for the heroic actions of the two Capitol police officers who took down the gunman . . . during a very, very brutal assault,” President Trump said soon after the horrifying attack.

“We may have our differences, but we do well in times like these to remember that everyone who serves in our nation’s Capitol is here because, above all, they love our country,” he added.

Rep. Joe Barton (R-Texas), who coaches the Republican team and was at the practice with sons Jack and Brad, decried the shooting as “unconscionable” during a press conference hours later.

“He was doing it simply because he didn’t like the political climate and chose to start shooting at a bunch of congressmen who today happened to be Republicans,” he said. “That’s not America.”