Image copyright Getty Images

US Republican lawmakers who were ambushed by a gunman while playing baseball at a field in Virginia are clearly relieved that an armed security detail was present.

If US Capitol Police officers hadn't been there, Kentucky Senator Rand Paul said, "it would have been a massacre".

The attack - which saw four people, including House Majority Whip Steve Scalise, shot - has rekindled debates about how politicians are protected.

The two police officers had a gunfight with the rifle-wielding attacker before local support arrived, and have been praised for their life-saving efforts by President Trump.

But they were only there in the baseball diamond because Mr Scalise is part of a small group of about 10 high-ranking lawmakers eligible for round-the-clock protection.

This includes the party leaders in each chamber of Congress, their whips, the House speaker and the president pro tempore of the Senate (who presides when the president, ie US Vice-President Mike Pence, is absent).

Other members are usually left to their own devices when outside the US Capitol complex, where security is tight, though they can request protection in response to threats.

A few politicians have admitted to carrying guns in their home districts if state laws allow them to do so, and some argue they should be allowed to do so in Washington too.

More commonly they organise their own security - including with the help of local police - for events like town hall meetings, which can get heated and draw protesters.

The risks of meeting constituents in an open and un-policed environment were brought into sharp focus when Democrat representative Gabrielle Giffords was shot in the head while holding a Congress On Your Corner event outside a supermarket in Tucson, Arizona in 2011. She survived the shooting but six others died.

Still, many members of Congress have been resistant to putting barriers between themselves and the people who elect them.

This is despite the reported threats that many of them receive.

"I'd hate that we need something to separate us from the people we represent," Senator Pat Toomey of Pennsylvania was quoted by CBS affiliate WUSA9 as saying.

Still, he admits there are "obviously dangers, so it's worth thinking about".

Media playback is unsupported on your device Media caption Texas congressman fights back tears as he recounts shooting

Concerns have already been raised by members of Congress in a closed-door meeting with law enforcement authorities.

"Everyone's getting a bunch of death threats right now," Representative Ruben Gallego, a Democrat from Arizona, told the LA Times.

He said "a lot of members" had asked for changes to be made

Rep Al Green, a Texas Democrat, told ABC News that extra protection for lawmakers, both in Washington and in their home districts, was brought up.

But the resources required to protect all 535 members of Congress at all times would be massive.

Image copyright Getty Images Image caption US Capitol Police have been lauded for saving the lives of several Republican congressmen

Security has already been tightened significantly in recent decades in response to different threats, including a shooting at the Capitol in 1998 that saw two police officers killed, and anthrax-laced letters sent to senators in 2001.

There are now more than 2,100 officers and civilians working for the US Capitol Police, which has a budget of $375m.

But in 1800, after Congress relocated to Washington from Philadelphia, the US Capitol was protected by just one watchman.

John Golding could be considered the first US Capitol Police officer, though the unit was formally established a few decades later in 1828. By then it had grown to four members.

Since then the force has steadily evolved and grown. It had 132 men in 1935, 800 officers by the late 1990s, and staff numbers doubled in the years after the 9/11 attacks.

Media playback is unsupported on your device Media caption Congressman shot: 'He laid out there for 10 minutes alone'

In an increasingly tense and hotly partisan political environment, there is no shortage of threats being made.

Rep Adam Schiff, the top Democrat on the House intelligence committee, says he has received more "vehemently negative messages" as the panel looks into alleged Russian interference in the US election.

But like many others, he's resistant to significantly changing the way he operates vis-à-vis the public.

"All of us feel the need to be accessible to our constituents," he told The Press-Enterprise newspaper, "it's hard to imagine how we can be effective if we don't.

"But there may be some prudent steps we can take."