Tunisian officials say a knife-wielding man tried to attack police officers outside the main synagogue in the capital, but was subdued before wounding anyone.

The interior ministry said in a statement the failed attack took place Tuesday on Avenue de la Liberte, 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 Numerique reported that the assailant shouted that he hated Israel.

The suspect, a 45-year-old Tunisian, was being questioned by counterterrorism investigators.