Mali's interim president Colonel Assimi Goita was "safe and sound", his office said, after an assassination attempt by two men, one wielding a knife, during prayers at a mosque in Bamako on Tuesday.
An AFP journalist who witnessed the attack said the assailants lunged at Goita, who was quickly whisked away by security.
The journalist also said he saw blood at the scene, though it was not clear who had been wounded.
An official in the president's office later said Goita was "safe and sound", after what was labelled an assassination attempt.
Goita arrived at the military camp of Kati, outside the capital, "where security has been reinforced", the official added.
Security had subdued one attacker, and "investigations are ongoing", the presidency added in a statement.
The incident occurred after prayers for the Islamic festival of Eid al-Adha in the great mosque of Bamako.
Assailants went for the president as an imam was directing worshippers outside the mosque for a ritual animal sacrifice.
Religious Affairs Minister Mamadou Kone, who was at the mosque, told AFP that a man had "tried to kill the president with a knife" but was apprehended.
The mosque's director, Latus Toure, said an attacker had lunged at the president but wounded someone else.
Later, a security official who requested anonymity said that two people had been arrested and were now in detention.
The shocking attack follows months of political turmoil in Mali, which is also battling a jihadist insurgency that has claimed thousands of lives and driven hundreds of thousands from their homes.
Goita was sworn into power in June, after leading the country's second coup in less than a year.
The colonel had already led a putsch last August, when he and other army officers ousted elected president Ibrahim Boubacar Keita after weeks of mass protests over corruption and the long-running jihadist conflict.
The second coup in nine months sparked diplomatic uproar, prompting the African Union and the Economic Community of West African States (ECOWAS) to suspend Mali, calling for the appointment of a civilian prime minister.
France, which has thousands of troops stationed in the war-torn country, also suspended military cooperation with Mali.
The former colonial power followed by announcing that it would wind down its 5,100-strong Barkhane force that has battled jihadists in the Sahel since 2013.
The military junta handed power to a civilian-led transitional government, which promised to restore civilian rule in February 2022.
In June it unveiled its new government, appointing military figures in key roles.
Goita vowed at the time that the government would "uphold all its commitments", pledging to stage "credible, fair and transparent elections".
A large majority of the 15-nation UN's Security Council later called for free and fair elections to go ahead in the country without the participation of its current leaders.
Mali also faces unrest outside the political arena.
It has been struggling to contain an jihadist insurgency that first emerged in the north of the country in 2012, and has since spread to Burkina Faso, Mali and Niger.
Thousands of soldiers and civilians have been killed and hundreds of thousands have fled their homes.
The conflict has also been mirrored by political instability in the capital.