(Adds court orders gunman held, victim's name, details)
JERUSALEM, June 21 (Reuters) - An Israeli security guard shot dead a fellow-Israeli on Friday at one of Judaism's holiest sites, saying later he feared the man was a Palestinian militant because he had shouted "Allahu akbar" ("God is greatest" in Arabic), police said.
An Israeli judge ordered the guard kept in police custody for five days for questioning after the shooting at a restroom next to Jerusalem's Western Wall. The body of the victim, named Doron Ben-Shalush, 46, was found with 10 bullet holes.
Police spokesman Micky Rosenfeld said Ben-Shalush had been pronounced dead at the scene. He said the guard, whose name has not been disclosed, had told investigators he had suspected the man was a Palestinian militant.
"The fact he shouted Allahu Akbar, that seems to be why the security guard drew his weapon and fired a number of shots at him," Rosenfeld said, adding that the incident was still under investigation and there was a gag order on some details.
Israeli media said it was not clear why the guard had not fired first in the air, as rules of engagement normally demand.
The shooting took place as hundreds of worshippers gathered for prayer in one of Jerusalem's most sensitive areas. Police shut down the Western Wall for several hours after the shooting.
The Western Wall abuts what is known to Jews as Temple Mount and to Muslims as al-Haram al-Sharif. A flashpoint for Israeli-Palestinian tensions, Jews revere it as the site of two Biblical temples. It houses Islam's third holiest mosque, al-Aqsa.
Riots erupted there in September 2000 when then opposition leader Ariel Sharon visited the area. A five-year Palestinian uprising followed, in which thousands of people were killed.
(Writing by Allyn Fisher-Ilan; Editing by Alistair Lyon)