The four men, all in their 20s, were arrested on Tuesday, police said.

At least 10 bullets were fired at Oslo's only synagogue early on Sunday. Nobody was hurt in the attack.

Norwegian secret agents bugged the main suspect's car and recorded the suspects planning the attacks, a prosecutor told an Oslo court.

Police were seeking a court order to continue holding the men for questioning.

"They spoke in detail about how to attack the synagogue and the US and Israeli embassies," prosecutor Unni Fries was quoted as saying.

Defence lawyers quoted by Reuters news agency said one suspect was of Turkish origin, two had Pakistani backgrounds and one was a native Norwegian.

One suspect had been detained briefly in Germany in June, on suspicion of planning an attack during the football World Cup.