Pope Francis condemned on Wednesday recent terror attacks around the world, including in New York where eight people were killed, saying he was "saddened" by events.

"I am saddened by the terrorist attacks in recent days in Somalia, Afghanistan and yesterday in New York," the pope said during his Angelus prayer in St Peter's Square.

He asked people to pray that God "converts the hearts of terrorists and frees the world of hatred and murderous madness, which abuses the name of God to disseminate death," adding that he was praying for the victims and their families.

Eight people were killed and 11 injured in Lower Manhattan, New York, on Tuesday when the driver of a pickup truck hit people on a cycle path.

At least 27 people were killed on Saturday in the capital, Mogadishu, in an attack claimed by Al-Qaeda linked Shabaab militants.

In Afghanistan, a teenager blew himself up in Kabul's heavily fortified diplomatic quarter on Tuesday and killed at least five people.