The presidency, facing a flare-up in the political crisis that has dogged Morsi, said security forces would deal with violent protests with "utmost decisiveness" and that it would hold opposition groups found to have incited the clashes "politically accountable."
A statement on Morsi's Facebook page said the protesters sparked the violence by trying to break down the presidential palace gates and scaling its walls.
Ansari said 53 people have been injured in the clashes. The interior ministry said 15 of its men were wounded by birdshot, and that Interior Minister Mohammed Ibrahim has ordered a probe to "hold accountable" the policemen who beat the naked protester.
The opposition National Salvation Front, which called for nationwide protests on Friday, distanced itself from the violence outside the palace and urged protesters to exercise "utmost restraint."
But hours before the violence broke out, NSF leader and Nobel Peace laureate Mohamed ElBaradei suggested unrest would persist if Morsi kept on sidelining his opponents.
-- 'Violence and chaos will continue' --
"Writing on wall: violence and chaos will continue until Morsi and co. listen to people's demands: new government, democratic constitution, independent judiciary," he wrote on Twitter.
People took to the streets in several cities in a show of opposition to Morsi and his Muslim Brotherhood after deadly unrest swept the country last week in the worst violence since Morsi was elected president in June.
The opposition coalition is thought to exert little influence over restless activists involved in clashes.
"The National Salvation Front represents only itself," said one masked protester outside the palace. "We are satisfied neither with Morsi nor the opposition."
Scores of protesters skirmished with riot police several hundred metres (yards) from Tahrir Square where thousands rallied against Morsi, witnesses said, and two were wounded by birdshot fired by police.
The clashes were less intense than in the past week's unrest which resulted in 56 deaths, mostly in Port Said, where violence erupted after 21 residents were sentenced to death on Saturday over football-related violence last year.
Thousands of people protested in the Suez Canal city on Friday calling for Morsi's removal, unfazed by a strong military presence, and similar marches took place in the Mediterranean port city of Alexandria.
The opposition accuses Morsi of betraying the revolution that toppled Mubarak two years ago and took him to the presidency.
The NSF joined rival Islamists on Thursday in condemning violence and supporting efforts for a national dialogue, while insisting on a unity government and the amendment of the Islamist-drafted constitution, which polarised the nation when it was passed in December.
Top Islamic scholar Grand Imam Ahmed al-Tayyeb chaired talks on Thursday between the opposing sides in which they agreed to support dialogue and condemned violence.
The crisis has sapped the popularity of Morsi -- who won the June election with a slender majority -- and complicated negotiations for a crucial $4.8-billion IMF loan that could help bail out the teetering economy.
A presidency statement welcomed Thursday's Al-Azhar agreement as "an important step on the road to re-establishing stability."
The interior ministry said it respected "the right to peaceful protest," but urged all political forces to ensure "a peaceful and civilised" day on Friday, a spokesman said before violence flared again in the capital.