An MP has told a York jury of her shock and fear when she received multiple death threats by email in a single evening.

In a written statement, Bradford West MP Naz Shah said she was so concerned for her children's safety she dialled 999 and sent them to a safe place.

The last of the emails said: "Do you want a bullet through your window or a rifle through your head? If you support that girl, you are finished. Choose wisely."

Its subject heading was: "You are going to die this week."

"I no longer felt safe," the MP's statement said. "I felt I needed the police as soon as possible. I rang 999."

She added: "The threats were so direct and specific I believed the individual (who sent them) was genuinely planning to kill me."

The prosecution alleges all the emails were sent by Sundas Alam, 30, in order to get her former line manager and others in trouble.

The jury heard that the manager and two of his family were arrested by armed police four hours after Ms Shah rang 999 and held in custody for 20 hours on suspicion of sending the emails.

Alam, 30, of Princeville Street, Lidget Green, Bradford was arrested on April 5. She denies three charges of sending malicious emails and one of perverting the course of justice.

The jury at York Crown Court heard Ms Shah opened her laptop at 11pm on April 3 to find her email inbox full.

"One message jumped out," she wrote. Its subject heading was "wait and watch". The email was duplicated.

Sent four hours earlier, and purporting to come from the line manager's wife, it said: "I will kill you if you put my husband's job at risk" and made a veiled threat about the MP's children.

"I was shocked by this email but at this stage, not scared," the MP's statement said.

She immediately forwarded the emails to her personal police contact and continued reading her emails.

She found another one purporting to be from the same email account as the first two which included the words; "don't bother reporting this. If you do I will say I was hacked" and then continued with a sexual threat and insults.

Again she forwarded it to police.

Then she found the final two identical emails, both sent after 11pm with the subject heading: "You are going to die this week."

She said she had received death threats during the course of her work, but the delay between the first and the last ones made her think this was not just someone sending nuisance emails, but someone "stewing for hours" over the matter, she wrote in her statement.

She dialled 999 and after speaking to police, contacted her team to follow up references to the probation service in the emails.

With their help, she remembered she had had a Zoom call with Alam in January who had claimed she had been sacked for the probation service for whistleblowing. The MP had told her that it would be more appropriate for Alam to get legal advice rather than her MP's advice, the statement said.

The trial continues.