A West Midlands police counter-terrorism unit has been accused in court of perjury, falsifying notebooks and hiding text messages related to the trial of a group of terror suspects who called themselves the “Three Musketeers”.

Simon Hussey, a senior officer in West Midlands police’s special projects team, began giving evidence at the Old Bailey trial of four men from the Midlands accused of plotting terror attacks in late April but his cross-examination was interrupted, and the personal and work phones of several officers involved in the case were seized by the police shortly afterwards.

Defence barrister Stephen Kamlish QC said the texts and call records exposed the unit as “criminals who fabricate evidence, who ensure that documents go to courts that aren’t true accounts” and that Hussey and his team had repeatedly discussed their evidence with one another during the trial, despite being under orders from the judge, Mr Justice Globe, not to discuss the case.

Giving evidence in April, Hussey told the judge he had no communication during the trial with “Vincent”, an undercover officer who posed as the boss of a fake courier company set up to gather intelligence on two of the defendants. Central to the defence case is the allegation that Vincent planted a bag containing a pipe-bomb, an air pistol and other items under the driver’s seat of the car of Naweed Ali, one of the defendants, where it was discovered by the security services and triggered a major security alert.

But the messages and phone logs revealed repeated contact between Vincent and Hussey, including a seven-minute phone call from Vincent immediately after he finished giving evidence on his first day. Hussey said he could not remember what they had discussed. They also travelled in a group from Birmingham to London during the trial and stayed in the same hotel until they were advised not to by the prosecution’s barristers.

“Yes we met, but the principle is we don’t discuss the case,” he said.

“That was a clear and blatant lie,” Kamlish responded.

In the runup to the trial, the officers met at Hilton Park service station on the M6 to revisit their witness statements. Kamlish said a service station was chosen to avoid being spotted. “This is your regular clandestine criminal meeting place, isn’t it, so that other people won’t see you there,” he said.

Hussey denied this. “The location was geographically suitable for them to meet,” he said. “I believe that the statements were sent for Andy and Hajji [a third undercover officer] so that they could refresh their memories prior to attending the court to give evidence so they could individually prepare for the case.”

Kamlish claimed Vincent had rewritten his notebook by hand after the four men were arrested to include references to seeing defendants with the bag in which the pipe-bomb and air pistol were found. This was a “very big lie at the heart of the case”, he said.

The week after the arrests, Hussey texted Vincent: “We have agreed with cookie [a senior officer] that you will write your pocket book for Pesage [the name of the operation], not type, hope that helps.” Kamlish said this revealed Vincent falsifying his notes.

Hussey denied this: “Prior to that text to Vincent there had been discussions with Vincent as to who should complete a typed copy of his written pocketbook. It is generally the case that operatives produce a typed copy of their written pocketbook ... I said I would ask [another officer] who would produce the typed copy and he said his team would do that. So that text to Vincent tells him we’ve agreed that,” he said.

The text messages revealed a tight-knit group of officers: Vincent texted Hussey that he was preparing to give an “Oscar performance” on the witness stand, adding: “I won’t let you down … I would die first .”

Another undercover officer, referred to in court as Andy, retired shortly after the operation ended. Vincent texted him: “So you wanker … U leave me with a load of fucking wet wiped nob heads who don’t know how to put a job together wipe arses or cover tracks … Wanker …. Miss you.”

Hussey told the jury: “We’re close as colleagues, yes.”

The evidence is part of a 10-week trial of Naweed Ali, 29 and Khobaib Hussain, neighbours from Birmingham, and Mohibur Rahman, 32 and Tahir Aziz, 28 of Stoke-on-Trent, on charges of preparing terrorist acts between May and August 2016. All four men deny the charges.

The men were arrested in August 2016 during a major security alert after the bag containing the pipe bomb – which was later found to be non-viable – and the other weapons was found.

The case continues.