Tunisian police shot and wounded a known extremist who tried to attack them with a knife and axe outside the Interior Ministry in the capital, Tunis, on Friday.
The ministry said the 31-year-old man, whose identity was not disclosed, shouted "God is great. You are infidels", as he ran towards police officers.
The man, who was previously described as an extremist by the government, was taken to hospital and is being investigated by an anti-terrorism unit, officials said.
Video footage taken by witnesses shows a bearded man brandishing an axe outside the ministry building on Habib Bourguiba Avenue.
Several passers-by intervene, throwing metal barriers in his path, before a police officer shoots him twice and he falls to the ground.
A police officer said the man had been shot with rubber-tipped bullets.
Tunisia has witnessed several deadly extremist attacks since the 2011 uprising that overthrew long-time dictator Zine El Abidine Ben Ali.
The deadliest attack was in June 2015, when a gunman killed 38 people, mostly Britons, at a beach resort in the Sousse. That attack followed a raid by two gunmen at the National Museum in Tunis in March that left 23 people dead.
The last deadly attack took place in September last year, when attackers with knives killed a Tunisian National Guard officer and wounded another. Three of the attackers were later shot dead in a firefight.
Friday's incident comes amid a deepening economic and political crisis four months after President Kais Saied dismissed the government and assumed far-reaching powers, giving a warning about an "imminent threat" to the country.
With reporting from agencies