Mali's interim president, Col Assimi Goita, is "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.
Col Goita described that attack as an "isolated incident".
An AFP journalist who witnessed the incident said the assailants lunged at Col 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 Col Goita was safe, after what was labelled an assassination attempt.
Col Goita arrived at the military camp of Kati, outside the capital, "where security has been reinforced", the official added.
Security subdued one attacker, and "investigations are ongoing", the presidency said in a statement.
The incident occurred after prayers for Eid Al Adha in the Grand Mosque of Bamako.
The 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 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 an extremist insurgency that has claimed thousands of lives and driven hundreds of thousands from their homes.
Col 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 conflict.
The second coup in nine months sparked diplomatic uproar, prompting the African Union and the Economic Community of West African States to suspend Mali, calling for the appointment of a civilian prime minister.
France, which has thousands of troops stationed in the war-torn country, suspended military co-operation with Mali.
The former colonial power said it would wind down its 5,100-strong Barkhane force that has battled extremists in the Sahel since 2013.
The junta handed power to a civilian-led transitional government, which promised to restore civilian rule in February next year.
In June it unveiled its new government, appointing military figures to vital roles.
Col 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 UN Security Council later called for free and fair elections to go ahead in the country without the participation of its current leaders.