A man whose aggressive behaviour frightened staff in an MP's constituency office three months before the murder of her colleague Jo Cox will be sentenced later.
Jaseem Saeed, 39, had already admitted a charge of affray before he went on trial at Leeds Crown Court in relation to his behaviour in the office of Dewsbury's Labour MP Paula Sherriff, where he became aggressive while asking for help with a passport application.
But he was cleared by a jury in July of two counts of making threats to kill.
The judge, Mr Justice Goss, told Saeed at the time that he could not sentence him for the affray until he had more information about his situation, including his immigration status.
The judge said: "Here, unfortunately, we know that three months after he was behaving in this way a member of parliament lost her life."
He went on: "People occupying such roles are entitled to be protected in so far as the law can protect them."
During the two-day trial, the judge heard case worker Julie Ward describe how Saeed was aggressive and shouting as he asked about getting a passport so he could travel to Iraq.
Mrs Ward told the jury that Saeed threatened to shoot her, although she did not see a gun.
She also said the defendant, who is from Iraq but had lived in the UK for 14 years, talked about getting a rifle and shooting students at a local college.
Saeed told police Mrs Ward and another member of staff had misunderstood what he said due to his poor English.
Following the not guilty verdicts on the threats to kill charges, the judge said it was "an ugly episode that caused fear".
He said that, given the jury's verdicts, he would have to decide "precisely what he (Saeed) did and didn't say" in the MP's office on March 9.
Ordering a pre-sentence report, he said it appeared that Saeed, of Nelson Street, Dewsbury, does not suffer from any psychiatric conditions but does have "anger management issues".
He said these may best be addressed through a community punishment, especially as Saeed will have served the equivalent of a 13-month prison sentence while on remand before he is sentenced.
Saeed will be sentenced at Leeds Crown Court.
Ms Sherriff's base is four miles from the constituency office in Birstall, West Yorkshire, where her colleague Jo Cox was shot and stabbed to death in June.
Mrs Cox died when she was attacked outside her office in the town's library.