Nigeria’s President Muhammadu Buhari on Sunday denied claims that he had died and been replaced by a Sudanese impostor, breaking his silence on a rumour that has circulated on social media for months.

Mr. Buhari, who is running for re-election in February, spent five months in Britain last year being treated for an undisclosed illness. One theory widely aired on social media — and by some political opponents — was that he had been replaced by a lookalike from Sudan called Jubril.

No evidence has been presented, but videos making the claim have still been viewed thousands of times on YouTube and Facebook.

“It’s real me, I assure you. I will soon celebrate my 76th birthday and I will still go strong,” Mr. Buhari told Nigerians in a town hall session in Poland, where he was attending a conference, when asked about Jubril.

“A lot of people hoped that I died during my ill health,” he said, adding that those who spread the rumour were “ignorant and irreligious”.

The presidency circulated Mr. Buhari’s comments in an emailed statement entitled “It’s Real Me, President Buhari Responds to Cloning Allegation”.