Authorities in the Comoros report that President Azali Assoumani has been injured in a knife attack.
“Thank God his life is not in danger,” a government spokeswoman said.
He was stabbed at a funeral near the capital Moroni but suffered only “light injuries” and has since returned home, spokeswoman Fatima Ahamada told Reuters news agency.
She added that the attacker had been arrested.
The motive for the stabbing is not yet clear.
The identity of the man with the knife has not been officially confirmed, but multiple sources report that he is a young police officer.
President Azali first came to power in 1999 through a military coup.
After being out of office for a decade, he won a contested election in 2016 and was re-elected last January.
The vote was marred by allegations of vote fraud and was followed by two days of deadly protests.
Mr Azali is accused of increasing his authoritarianism.
More BBC stories about the Comoros:
Go to BBCAfrica.com for more news from the African continent.
Follow us on Twitter @BBCAfricaon Facebook on BBC Africa or on Instagram at bbcafrica
BBC Africa Podcasts