Two brothers had a shared goal to kill and maim as many people as possible in what proved to be one of the deadliest terror attacks the UK has seen, a trial has heard.

Hashem Abedi was just as guilty of murder as his brother Salman after encouraging and helping him to carry out the Manchester Arena bombing, the Old Bailey was told.

Abedi is accused of helping to plan the attack and build the suicide bomb that Salman detonated at the end of a concert by the singer Ariana Grande in May 2017, killing 22 people.

The 22-year-old is also accused of the attempted murder of other concertgoers who were injured but survived. Police identified nearly 1,000 victims of the attack, including 28 people who were very seriously injured, 111 others who were hospitalised and 670 who have reported psychological trauma.

Opening the biggest terror trial ever held on UK soil, the prosecutor Duncan Penny QC told the jury that the shrapnel-filled homemade bomb was designed to inflict “maximum damage” when it went off shortly after at 10.30pm on 22 May 2017.

Hashem Abedi, the brother of Manchester Arena bomber Salman Abedi. Photograph: Force for Deterrence in Libya/PA

Penny said Abedi was “just as responsible for this atrocity … as surely as if he had selected the target and detonated the bomb himself”.

As the defendant sat impassively listening to the evidence, family members of some of those who were killed in the attack sat yards away.

Penny said Abedi spent months working alongside his brother building prototype bombs until the final device was assembled.

The eventual target may well have been selected by Salman alone, Penny said, but the brothers had a shared goal to “maim and injure as many people as possible by the detonation of a large homemade bomb in a public place”.

Abedi is accused of obtaining the ingredients – “precursor chemicals” – for the bomb by creating fictitious online accounts and using the bank details of unsuspecting friends and family. He allegedly obtained and experimented with metal containers to make a number of prototype improvised explosive devices (IEDs).

The bombing was the “culmination of months of planning, experimentation and preparation by the two of them,” Penny said. “He is equally guilty of the attempted murder of many others and in doing so he was guilty of agreeing with his brother to cause an explosion. In acting as he did, the crown alleges that this defendant assisted and encouraged his brother to act as he did.”

He said the brothers began showing signs of radicalisation and began to plan the attack when they were living alone in their family home after their parents returned to Libya. Abedi worked at a pizza takeaway in Stockport and asked the owner if he could take empty and discarded metal vegetable oil cans and sell them for scrap.

Together with his brother, Abedi is said to have duped “gullible” friends and family including their cousin Alharth Forjani into lending their Amazon accounts to buy chemicals. They obtained a separate postal address from an acquaintance in the Libyan community in Manchester to have other chemicals delivered, the court heard.

The brothers’ cover story was that they needed to refill a large electric battery at the family home in Libya that was used to power a generator, and – a “variation on the theme” – that they were topping up a leaking car battery.

The eventual device was manufactured from a mixture that included hydrogen peroxide and sulphuric acid, which were “readily available to buy from wholesalers and on the internet”. The bomb was packed with shrapnel including nuts, cross dowels and screws, and the detonator casing was fashioned from old vegetable oil cans.

On the night of the concert, in anticipation of the expected audience profile being younger than normal, staff at the arena were advised to ensure that people dropping off young fans for the show had a phone number by which to contact them at the end of the night.

The City Room, where Salman detonated the bomb, was a foyer area that acted as a point for parents and family to collect young concertgoers. It was said to be a “natural assembly point within the complex for people to gather at the conclusion of the concert in order to meet up with or to collect their loved ones”, and at the time was heavily congested with people.

“In the midst of these people, carrying a heavy rucksack that contained a homemade bomb, was Salman Abedi,” Penny said.

Of the 22 casualties, 19 died at the scene and another three were treated by members of the public and the emergency services but “sadly succumbed to their injuries shortly thereafter”.

After the bombing, police identified a series of addresses in Manchester that the brothers had used to receive deliveries, construct prototypes, store materials, and manufacture explosives, the court heard. A 7cm piece of twisted metal from a cans, labelled “Can F”, was found in some green fabric at the music venue.

The court heard Abedi had studied electrical installation and documents discovered at his home later revealed he also had a basic knowledge of electrical circuitry.

Abedi claims he had nothing to do with making the bomb and had “no inkling” of his brother’s radicalisation, believing that Salman had acquired the chemicals for “family reasons rather than terrorist ones”.

But the prosecution alleges his fingerprints were found on a number of significant items that suggest he was involved in the bombing, including pieces of metal tightly rolled into improvised cylinders. His fingerprints and DNA were found at a rented flat where traces of the homemade explosive triacetone triperoxide (TATP) were also discovered, Penny said.

“The crown’s case is that this defendant was well aware of what he was doing. This was no idling away the hours in the garden shed whilst smoking, as the defendant was later to tell police. Rather he was handling these items for a specific purpose, the very same purpose which lay behind his other actions,” said Penny.

Abedi, who is of Libyan heritage, denies all of the charges against him. The trial continues.