The Israel Defense Forces (IDF) has condemned the behaviour of some of its soldiers who were filmed singing and praying down a microphone in a mosque in Jenin in the occupied West Bank.
It comes during an operation against militants in the city, which has so far left 11 Palestinians dead, the Palestinian health ministry says.
The IDF said the soldiers "will be disciplined accordingly".
It said it would also act in similar cases which have been filmed in Gaza.
The clips, which are circulating on social media, show scenes of the mosque. In one recording, a song about banishing darkness, associated with the current Jewish festival of Hanukkah, is heard sung in Hebrew through a loudspeaker in a minaret. The person filming laughs and joins in with the song.
Other clips show soldiers inside a mosque reciting a Jewish prayer down a microphone. The Palestinian foreign ministry condemned what it called "a mockery of [the mosque's] sanctity".
In a statement on Thursday, the IDF said the soldiers "acted against IDF codes of conduct within a religious establishment".
The statement said those responsible "were immediately removed from operational activity".
It added: "The behaviour of the soldiers in the videos is serious and stands in complete opposition to the values of the IDF."
The incidents in Jenin are not the first time Israeli soldiers have been upbraided for bad behaviour filmed and posted on social media recently.
Since Israeli forces have been fighting the war in Gaza from the end of October, videos have emerged including showing a soldier smashing up a toy shop, while the person filming laughs; soldiers setting fire to goods in the back of a lorry; and another rummaging through women's clothes in what appears to be a private residence.
On Sunday, IDF spokesman Rear Adm Daniel Hagari condemned the soldiers' behaviour.
"IDF forces operate according to the values and spirit of the IDF," he said. "Soldiers on the battlefield are required to act professionally and ethically, and we will not compromise on this. In any event... [the videos do not] align with IDF values, command and disciplinary steps will be taken - this is the way in the IDF."
In Jenin, meanwhile, Israeli forces have been battling Palestinian militants since the IDF launched an operation to arrest suspects there on Tuesday.
Eleven Palestinians have been killed by Israeli troops in the city, the Palestinian health ministry says. The ministry says one of those killed was a 13-year-old boy.
The IDF says it has carried out house-to-house searches in the refugee camp there and has found dozens of weapons, explosives laboratories, tunnel shafts and observation posts. It says it has also detained hundreds of suspects.