The bomb attack in Manchester that killed 22 people and injured 59 others during an Ariana Grande concert on 22 May was planned since December 2016, security officials in Libya told the BBC.

Salman Abedi was seen in Libya more than a month before the bombing and officials have said that they were keeping a watch on him. They added that Abedi spent almost a month in Tripoli, where his family lives, before returning to Britain to execute his plan.

The officials have also said that they were keeping an eye on his father Ramadan and brother Hashem, who are still being interrogated by Libya's Special Deterrence Force.

However, it was not clear whether the information was shared with the UK officials.

A spokesman of Libya's Special Deterrence Force said they had crucial details about Abebi and his contacts in both the countries. But due to poor security co-operation with the UK, they were unable to take a proper response.

Officials have also called for better co-operation to avoid any further attacks. A general with the UN-backed government in Tripoli said steps should be taken for better intelligence as soon as possible to prevent another Manchester, the BBC reported.

Salman Abedi CCTV
Greater Manchester Police have released new CCTV stills of Salman Abedi in a bid for further information about his final movermentsGreater Manchester Police

Abedi's brother has reportedly confessed while in detention that he along with his brother joined the Islamic State (Isis) in 2015. But it remained unclear whether he admitted it of his own volition or under threat.

Meanwhile, British authorities have said that Abedi had likely built the bomb, which he used for the attack, on his own. They added that he built the device at his flat.

The counter-terrorism head said it was "less clear" whether he had obtained and stored all the materials or if others were "complicit". Initially, the officials have detained at least 22 people in connection with the attack, but most of them have now been released without charge.

Manchester bombing vigil
People hold 'I love MCR' banners as they arrive to attend a vigil in Albert Square in Manchester, northwest England on May 23, 2017, in solidarity with those killed an injured in the 22 May terror attack at the Ariana Grande concert at the Manchester Arena.BEN STANSALL/AFP/Getty Images