A GOP lawmaker said Wednesday that the alleged gunman in a shooting at a congressional baseball practice that wounded five asked whether “Republicans or Democrats” were on the field shortly before the attack in Virginia.

Rep. Ron DeSantis, R-Fla., told CNBC that a man came up to him and Rep. Jeff Duncan, R-S.C., at the practice and asked if the players on the field were Republicans or Democrats.

“We both agreed that that individual who came up to us and asked if it was Republicans or Democrats ... is the same individual police have identified," DeSantis said. "That picture is the same guy that we saw.”

The man approached him and Duncan in their car and asked who was playing, and Duncan responded that they were Republicans, DeSantis said.

“We both kind of shrugged it off, by the time we got back to the Hill when news broke we immediately called each other and said that guy was ... we’ve got to report that,” he said.

Duncan told reporters, "I actually left right before the shooting happened and had an interaction with, who I believe, was the shooter based on the profile that I saw on TV. I have given a statement to the Alexandria Police Department this morning.

"After I heard about the shooting, they asked me to come down there because I did have an interaction with someone in the parking lot who asked me if the team practicing was a Democratic or Republican team," he added. "I told him they were Republicans. He said, 'Ok, thanks.' [He] turned around. I got into the car and left to find out my Republican colleagues were targeted by the active shooter."

Senator Bernie Sanders (I-Vt.) said in a statement he’d been told the shooter had "apparently volunteered" on his 2016 presidential campaign. “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.”

Rep. Joe Barton, R-Texas, center, and other members of the Republican Congressional softball team, stand behind police tape of the scene of the shootings in Alexandria. Cliff Owen / AP

PHOTOS: Gunman Opens Fire at Republican Baseball Practice

House Majority Whip Steve Scalise was among five people wounded during the Wednesday morning shooting. Scalise was transported to a hospital in Washington, D.C., where he underwent surgery and was in critical condition, the hospital said Wednesday afternoon.

Federal law enforcement officials identified the suspected shooter to NBC News as James T. Hodgkinson, 66, from Belleville, Illinois. President Donald Trump announced that the suspect had died.

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

One Capitol Police officer was also wounded in the incident with non-life threatening injuries.

Related: Virginia Shooting Witness: 'It Was A Firefight' on Baseball Field

DeSantis also described the incident on MSNBC and said he and Duncan decided to leave the practice early Wednesday morning to beat traffic.

“We left the field probably a little after 7 o’clock, the rest of the guys were still out their practicing,” he said.

James Hodgkinson was charged in 2006 with assaulting his girlfriend. The charges were later dismissed. Illinois police

DeSantis also said he believed there could have been more injuries or possibly deaths if Scalise had not been present, because as a member of congressional leadership he had his Capitol Police security detail with him.

"Had Steve just not decided to come to practice this morning, that shooter was there I think you're looking at way more people wounded and probably some people who would have been killed because you would have had members of Congress and congressional staff out on baseball diamond with no way to really defend themselves," he said.