JERUSALEM — The publication late last week of eyewitness accounts by Israeli soldiers alleging acute mistreatment of Palestinian civilians in the recent Gaza fighting highlights a debate here about the rules of war. But it also exposes something else: the clash between secular liberals and religious nationalists for control over the army and society. Several of the testimonies, published by an institute that runs a premilitary course and is affiliated with the left-leaning secular kibbutz movement, showed a distinct impatience with religious soldiers, portraying them as self-appointed holy warriors. A soldier, identified by the pseudonym Ram, is quoted as saying that in Gaza, “the rabbinate brought in a lot of booklets and articles and their message was very clear: We are the Jewish people, we came to this land by a miracle, God brought us back to this land and now we need to fight to expel the non-Jews who are interfering with our conquest of this holy land. This was the main message, and the whole sense many soldiers had in this operation was of a religious war.” Dany Zamir, the director of the one-year premilitary course who solicited the testimonies and then leaked them, leading to a promise by the military to investigate, is quoted in the transcripts as expressing anguish over the growing religious nationalist elements of the military. “If clerics are anointing us with oil and sticking holy books in our hands, and if the soldiers in these units aren’t representative of the whole spectrum of the Jewish people, but rather of certain segments of the population, what can we expect?” he said. “To whom do we complain?” For the first four decades of Israel’s existence, the army — like many of the country’s institutions — was dominated by kibbutz members who saw themselves as secular, Western and educated. In the past decade or two, religious nationalists, including many from the settler movement in the West Bank, have moved into more and more positions of military responsibility. (In Israeli society, they are a growing force, distinct from, and more modern than, the black-garbed ultra-Orthodox, who are excused from military service.) In many cases, the religious nationalists have ascended to command positions from precisely the kind of premilitary college course that Mr. Zamir runs — but theirs are run by the religious movements rather than his secular one, meaning that the competition between him and them is both ideological and careerist. “The officer corps of the elite Golani Brigade is now heavily populated by religious right-wing graduates of the preparatory academies,” noted Moshe Halbertal, a Jewish philosophy professor who co-wrote the military code of ethics and who is himself religiously observant but politically liberal. “The religious right is trying to have an impact on Israeli society through the army.” For Mr. Halbertal, like for the vast majority of Israelis, the army is an especially sensitive institution because it has always functioned as a social cauldron, throwing together people from all walks of life and scores of ethnic and national backgrounds, and helping form them into a cohesive society with social networks that carry on throughout their lives. Those who oppose the religious right have been especially concerned about the influence of the military’s chief rabbi, Brig. Gen. Avichai Rontzki, who is himself a West Bank settler and who was very active during the war, spending most of it in the company of the troops in the field. He took a quotation from a classical Hebrew text and turned it into a slogan during the war: “He who is merciful to the cruel will end up being cruel to the merciful.” A controversy then arose when a booklet handed out to soldiers was found to contain a rabbinical edict against showing the enemy mercy. The Defense Ministry reprimanded the rabbi. At the time, in January, Avshalom Vilan, then a leftist member of Parliament, accused the rabbi of having “turned the Israeli military’s activity from fighting out of necessity into a holy war.” Immediately after Israel withdrew its settlers and soldiers from Gaza in 2005 and then from several West Bank settlements, there was a call to disband certain religious programs in the army because some soldiers in them said they would refuse to obey future orders to disband settlements. After the rise of Hamas in Gaza and the increase in rocket attacks on Israel, that discussion died down. But Yaron Ezrahi, a leftist political scientist at Hebrew University who has been lecturing to military commanders, said that the call to close those programs should now be revived because what was evident in Gaza was that the humanistic tradition from which a code of ethics is derived was not being sufficiently observed there. The dispute over control of the army is not only ideological. It is also personal, as all politics is in this small, intimate country. Those who disagree with the chief rabbi have vilified him. Those who are unhappy with what Mr. Zamir did by leaking the transcript of the Gaza soldiers’ testimonies last week have spread word that he is a leftist ideologue out to harm Israel. In 1990, Mr. Zamir, then a parachute company commander in the reserves, was sentenced to prison for refusing to guard a ceremony involving religious Jews visiting the West Bank city of Nablus. For some, that refusal is a badge of honor; for others it is an act of insubordination and treason. A quiet campaign began on Thursday regarding Mr. Zamir’s leftist sympathies, to discredit the transcript he publicized. At the same time, Rabbi Rontzki’s numerous sayings and writings have been making the rounds among leftist intellectuals. He has written, for example, that what others call “humanistic values” are simply subjective feelings that should be subordinate to following the law of the Torah. He has also said that the main reason for a Jewish doctor to treat a non-Jew on the Sabbath, when work is prohibited but treating the sick and injured is expected, is to avoid exposing Diaspora Jews to hatred. Mr. Halbertal, the Jewish philosopher who opposes the attitude of Rabbi Rontzki, said the divide that is growing in Israel is not only between religious and secular Jews but among the religious themselves. The debate is over three issues — the sanctity of land versus life; the relationship between messianism and Zionism; and the place of non-Jews in a sovereign Jewish state. The religious left argues that the right has made a fetish of the land of Israel instead of letting life take precedence, he said. The religious left also rejects the messianic nature of the right’s Zionist discourse, and it argues that Jewish tradition values all life, not primarily Jewish life. “The right tends to make an equation between authenticity and brutality, as if the idea of humanism were a Western and alien implant to Judaism,” he said. “They seem not to know that nationalism and fascism are also Western ideas and that hypernationalism is not Jewish at all.” New York Times