The Israeli military says the West Bank will be closed off until the end of the Jewish holiday of Shavuot due to security concerns following a Palestinian shooting attack this week that killed four civilians.

It said Friday that crossings will be open for "humanitarian" cases and for Palestinians to worship at al-Aqsa mosque in Jerusalem.

Police are on high alert in Jerusalem as thousands of Palestinians are expected for prayers on the first Friday of the Muslim holy month of Ramadan.

The holy site has been a flashpoint of violence in the past, and tensions are especially high after Palestinian gunmen killed four Israelis in a shooting at a popular Tel Aviv tourist spot on Wednesday.

The military says the closure will end Sunday night after the Shavuot holiday.