The offices of six MPs were bombarded with obscene and menacing phone calls and voicemails as Parliament was meeting to try to agree a Brexit deal in January, a court heard.

Labour’s Keir Starmer QC, Barry Gardiner, and Jenny Chapman were targeted along with Conservatives Nick Boles, Nicky Morgan, and Dominic Grieve QC in a two-week harassment campaign, it is said.

Their constituency and Parliamentary offices received hate-filled phone calls and voicemails, as Theresa May was trying to get her Brexit withdrawal agreement through the House of Commons.

Mr Starmer, the shadow Brexit secretary, has been key for Labour in negotiations over leaving the EU, while Mr Gardiner is one of Jeremy Corbyn’s closest aides. Darlington MP Ms Chapman is a shadow Brexit minister.

Mr Boles, the MP for Grantham and Stamford, has been a strong opponent of a hard Brexit and quit the Conservative whip in protest last month, while backbenchers Ms Morgan and Mr Grieve have been leading figures in the House of Commons Brexit battles.

Robert Vidler, 63, from West Harrow, is accused of targeting the MPs with a series of menacing and obscene phone calls between January 7 and 21.

It is alleged staffers for the MPs were the ones who actually answered the calls or first listened to the voicemails.

Vidler denies five counts of harassment without violence and three charges of sending an offensive, indecent, obscene, or menacing message.

He was freed on bail on the condition he does not contact any MP or any MP’s assistant, and sleeps each night at his home address.

He is due to stand trial at City of London magistrates’ court on July 19.