LONDON (Reuters) - A British man who had made bombs for the Taliban in Afghanistan and was plotting an attack near London’s parliament was convicted of terrorism offences on Tuesday.

Slideshow ( 3 images )

Khalid Ali was carrying three knives when he was arrested by armed police in April last year.

Only just over a month earlier, a British-born convert to Islam had plowed a car into pedestrians on nearby Westminster Bridge, killing four people, before stabbing a policeman to death in the grounds of parliament.

The Old Bailey court heard Ali, 28, had intended to kill a police officer, a member of the armed forces or even a Member of Parliament, the Crown Prosecution Service (CPS) said.

Five days before he was stopped, Ali visited potential targets such as Westminster Bridge, the Houses of Parliament and Whitehall.

His fingerprints matched those found on bomb-making components recovered in Afghanistan in 2012 and held on an FBI database, the CPS said in a statement.

Some of the prints were on the sticky side of adhesive tape used in their manufacture which the prosecution argued indicated he had made the devices and was not merely handling them.

The court heard Ali had left Britain in 2011 and spent time in Pakistan and Afghanistan where he joined the Taliban and became a bomb-maker. He claimed he had gone to the region to learn more about Islam and go hiking in the mountains.

Ali returned to Britain in 2016 and gave the impression that he had returned to his former life training and working as a gas fitter and plumber but by March 2017 he was planning a terror attack in London.

“Khalid Ali planned to carry out a vicious knife attack in London that could have injured many and endangered life,” said Sue Hemming from the CPS.

He will be sentenced at a later date.