Four teenagers have been charged with attempted homicide, robbery, assault and other counts after they allegedly tried to rob two state representatives only blocks from the Pennsylvania state capitol and ended up exchanging gunshots on a public street.

State Rep. Marty Flynn, D-Scranton, formerly a prison guard for the Lackawanna County Prison, was walking along the street with Rep. Ryan Bizzarro, D-Erie, late Tuesday after a day of legislative work then dinner out, according to PennLive.com.

The men were confronted by a man who allegedly pulled out a gun and demanded their wallets, police reported.

According to Thom Welby, chief of staff for Flynn, one of the alleged attackers pulled the weapon and demanded money, "to which Rep. Flynn responded with some expressive language that they're not getting anything from him."

TRENDING: Undercover journalist turns the tables, sues Planned Parenthood for defamation

The suspect, who was described by Welby as "nervous," then fired a shot, "and Marty pulled his weapon and fired two shots," Welby told PennLive.

Both lawmakers were uninjured. A statement released later by Democrats in the state House said they were prepared to testify in any court proceeding.

See the WND Superstore's offerings on the issue of weapons, including "The Future of the Gun," "The Gun Rights War," "The Heller Case" and "Armed Response," among others.

Flynn also said in the statement: "We are used to fighting for the people in our districts every day. We certainly are going to stand up for ourselves and not become victims."

Both were elected in 2012. With such a short tenure in the legislature, their records were scant, but VoteSmart reported Bizzarro's rating by the National Rifle Association on gun rights was 92 percent.

Reports say Harrisburg police were charging Jamani Ellison, 17; Jyair Leonard, 15; Derek Anderson, 17, and Zha-quan McGhee, 15, with a laundry list of counts.

The Democratic Caucus report said Flynn turned his weapon over to Harrisburg police when he called 9-1-1, but he is licensed to carry the gun he fired.

At the BearingArms.com blog, Bob Owens wrote: "Unlike most lawmakers, Flynn has extensive first-hand experience with criminals thanks to his former career as a prison guard. He was smart enough to get a concealed carry permit, and carried a concealed weapon for self-defense."

Owens said that because of Flynn's "decision to be prepared," he was able to defend himself.

"While we're always happier when the criminals are incapacitated and/or apprehended at the scene, the important thing is that Reps. Flynn and Bizzarro are safe ... and aren't likely to ever consider voting for gun control."