ISTANBUL — President Recep Tayyip Erdogan of Turkey appeared to faint on Sunday because of what he said were complications with his blood-sugar level and blood pressure.

Mr. Erdogan, 63, was sitting for early morning prayers when he seemed to lose consciousness for a few moments at a mosque in Istanbul, several Turkish news outlets reported. He was quickly treated on a stretcher by doctors and made a rapid recovery; less than an hour later, he gave an explanation for the incident in a speech to reporters.

“Today, I had a little instability due to my blood pressure, for reasons related to my blood sugar,” Mr. Erdogan said. “But now I am recovered and in a better condition.”

No journalists were inside the mosque when the incident happened. But one reporter who was waiting outside said that, according to witnesses he interviewed, the president slumped to his left and was immediately caught by his guards.