He recalled hearing of the murder of Jo Cox, who was assassinated by a neo-Nazi outside her constituency surgery in 2016, and told how he was escorted out of parliament during the 2017 Westminster attack.
Sir David said MPs had been advised to be “vigilant of the general public visiting constituency surgeries” after a parliamentary assistant was killed by a man targeting Liberal Democrat MP Nigel Jones in 2000.
“We all make ourselves readily available to our constituents and are often dealing with members of the public who have mental health problems, it could happen to any of us,” Sir David wrote.
He said that Ms Cox was murdered in the “most barbaric fashion imaginable”, adding: “She was a young woman with a family going about her duties as we all do, completely unaware of the threat that she faced.”
The MP for Southend West in Essex was stabbed during a constituency surgery at Belfairs Methodist Church in Leigh-on-Sea on Friday.
Essex Police said he died at the scene, and a suspect has been arrested on suspicion of murder.
Sir David had advertised the surgery, which is a regular opportunity for constituents to air their views and seek assistance, on his Twitter page on Tuesday, giving the location and contact details to book an appointment.
In his book, the MP described how heightened security concerns had caused MPs to change how they interact with the public, and affected how constituency surgeries operate.
“Advice has been given to be more careful when accepting appointments,” he added. “We are advised to never see people alone … these increasing attacks have rather spoilt the great British tradition of the people openly meeting their elected politicians.”
Sir David said he had experienced “nuisance” from people turning up at his home in the past, and received frequent abuse online.
He called the fallout from social media a “worrying development”, writing: “My frustration is with the law governing social media generally … it means that these ignorant cowards are allowed to get away with, quite frankly, appalling behaviour and there is no means to find out who is abusing.
“The law in this regard needs to be changed as a matter of urgency.”
Sir David wrote that while he was the MP for Basildon around 1990, he was informed that the IRA had made a death threat against him.
He said he was living with his wife and young children at the time, and was given an emergency button to raise the alarm but “mercifully, nothing happened”.
Sir David was first elected to parliament to represent Basildon in 1983, and then stood for election in Southend West in 1997.
He was the chair of the All-Party Parliamentary British-Qatar Group, and recently met the country’s emir in Doha.
On his website, he listed his main interests as “animal welfare and pro-life issues”. Sir David is survived by his wife and five children.
Register for free to continue reading
Registration is a free and easy way to support our truly independent journalism
By registering, you will also enjoy limited access to Premium articles, exclusive newsletters, commenting, and virtual events with our leading journalists
Already have an account? sign in