LONDON (AP) — The former top aide to ex-British Prime Minister Boris Johnson on Tuesday painted a picture of widespread chaos and dysfunction in the U.K. government during the coronavirus pandemic.

In keenly awaited testimony to the country’s public inquiry into the COVID-19 pandemic, Dominic Cummings was withering about many of the people dealing with the situation, including his former boss, describing a culture of toxic relations and lack of trust — but denied that he had broken any rules.

“I would say, overall, it’s widespread failure, but pockets of excellent people and pockets of excellent teams doing excellent work within an overall dysfunctional system,” said Cummings, a self-styled political disruptor.

In emails and WhatsApp messages that were handed to the inquiry and read out by the lead counsel, Cummings also slammed many in Johnson’s Cabinet and other top officials in expletive-ridden terms.

While apologizing repeatedly for his “deplorable” language that was aired live across British media, Cummings denied he was a misogynist and said the exchanges took place in the midst of the “underlying insanity” that was in place at Johnson’s Downing Street offices.

“My appalling language has always been my own but my judgment of a lot of senior people was widespread,” said Cummings, who was the prime minister’s chief adviser during the first months of the pandemic in 2020 and at the heart of the U.K.’s response.

Cummings also said Johnson, who was hospitalized for several days with the virus in April 2020, lacked focus and discipline, constantly changing his mind during the pandemic which made it difficult to set policy.

“Pretty much everyone called him the trolley,” he said, using the British term for a shopping cart.

Cummings was hired by Johnson after helping to mastermind the victorious “leave” campaign in Britain’s 2016 European Union membership referendum. He went to work in Downing Street when Johnson became prime minister in 2019, filling a loosely defined but powerful role that saw him dubbed “Boris’ brain.”

At one point in May 2020, Cummings became the focal point of the pandemic when it emerged that he had driven 250 miles (400 km) across England to his parents’ house while the country was under a “stay-at-home” order and while he was ill with coronavirus. Cummings made a later journey to a scenic town 30 miles (50 km) away.

At the time Johnson resisted calls to fire him, but Cummings left his job in November 2020 and has fired broadsides at Johnson ever since. He conceded to the inquiry that he left government with someone “unfit for office” at its helm.

During his testimony, he also took a swipe at many of the formal structures of government during the pandemic and how a lack a planning hobbled the immediate response to the virus after it first emerged in China in late 2019.

The Cabinet Office, which coordinates policy around departments, bore the brunt of Cummings’ scorn. Describing it as a “dumpster fire,” he accused it of trying to block a shielding plan for the vulnerable in the days and weeks before Johnson eventually announced a national lockdown on March 23, 2020.

Cummings follows other aides who have painted a picture of Johnson as a leader who was distracted and indecisive during the country’s biggest peacetime crisis.

Also on Tuesday, former top communications director Lee Cain, said Johnson’s erratic decision-making was “rather exhausting” and indicated that the pandemic did not suit his temperament.

Cain said COVID was “the wrong crisis for this prime minister’s skillset” and that Johnson, in the early days of the pandemic, often referred to the mayor in the 1975 Stephen Spielberg movie “Jaws,” who wanted to keep the beaches open despite mounting evidence of a deadly shark in its waters.

Cain also said that Johnson considered allowing the pandemic to let rip through the elderly population in order to protect the economy and allow younger people to live their lives, but that he eventually took “the moral and responsible action” of imposing lockdowns, though admittedly later than they should have been.

The U.K. has one of the highest COVID-19 death tolls in Europe, with the virus recorded as a cause of death for around 230,000 people.

Johnson, who was forced to step down as prime minister in September 2022 following revelations of rule-breaking parties at his Downing Street residence during the pandemic, is due to address the inquiry before Christmas. Current Prime Minister Rishi Sunak is also expected to give evidence this year as he was Johnson’s Treasury chief during the pandemic.

The inquiry is divided into four so-called modules, with the current phase focusing on political decision-making around major developments, such as the timing of lockdowns. The first stage, which concluded in July, looked at the country’s preparedness for the pandemic.

Overall, the probe, which is being led by retired judge Heather Hallett, is expected to take three years to complete, though it will be publishing interim reports in the meantime in the hope of bolstering Britain’s response in the event of another pandemic.

Johnson agreed in late 2021 to hold a public inquiry after heavy pressure from bereaved families, who have hit out at the evidence emerging about his actions.

“The nastiness, arrogance and misogyny at the heart of government during the pandemic is core to the awful decision-making that led to thousands of unnecessary deaths and tore families like mine apart,” said Susie Flintham, spokesperson for COVID-19 Bereaved Families for Justice U.K.

“When you see that these figures had such a shocking disregard for each other, you can only imagine the disregard they had for families like mine,” she added.