A man has tried to blow himself up near a busload of tourists in the Moroccan city of Meknes, about 130km east of the capital, Rabat, police say.
Security has been stepped up across the country
No-one else was injured, but the young attacker lost an arm when the butane gas cylinder he was carrying exploded. He was taken to hospital.
The police say the driver's vigilance prevented the man reaching the coach. They are looking for two suspects.
This attack follows a series of suicide bombings in April.
Meknes, which is one of Morocco's historic imperial cities, is a popular destination for foreign visitors.
In April, five men blew themselves up and another was shot dead by police in the city of Casablanca.
In July, Morocco raised the terror alert to its highest level, citing a serious threat of a terrorist act.
More police have been deployed and road blocks have been set up outside most cities.
The alert came amidst warnings from al-Qaeda that North Africa would be in for what it called "a hot summer".