Tunisian officials said a knife-wielding man tried to attack police officers outside the main synagogue in Tunis, but was subdued before wounding anyone.
The interior ministry said in a statement the failed attack took place on Tuesday on Avenue de la Liberté, a major artery in Tunis.
Police union official Nassim Rouissi told Shems FM radio that the attacker, acting alone, tried to stab a police captain outside the synagogue.
Witnesses quoted by online newspaper Tunisie Numérique reported that the assailant shouted that he hated Israel.
The suspect, a 45-year-old Tunisian, was being questioned by counter-terrorism investigators.