“There are always people who are unhappy. There are people who will try to destabilise,” he said.
Dressed in the same sky blue embroidered robe and matching hat he wore at the mosque, Goita was shown receiving well-wishers and insisted the attack was “an isolated action”.
Images posted online by Mali's Joliba news agency showed at least two men being forcibly removed from the Grand Mosque by security forces. It was not immediately clear if the men were suspected of participating in the attack.
Prime Minister Choguel Maiga, who was sitting near Goita at the time of the attack, told state television that a man wielding a knife had approached the interim president at the end of the prayer and attempted to stab him in the neck.
“As you know the interim president is an officer of the special forces, and I believe his instinct help prevent the aggressor from reaching his objective,” Maiga said.
He added that the 38-year-old Goita and his security guards had kept their calm during the incident.
Despite initial condemnation of the May coup by western allies like France, which is seeking to end its military mission in West Africa's Sahel region, Goita was sworn in as interim president last month.
He has vowed to oversee a transition that will lead to democratic elections.