In large study halls, ranks of young Jewish men are bent over religious books or debating in pairs the meaning of their texts. Many wear the large knitted kippa associated with the settler movement; a few have guns by their side.

This scene is typical in settlements all over the West Bank, where the hesder yeshiva movement has gained strength in recent decades. The programme, backed by the Israeli Defence Forces (IDF), allows religious Jews to combine intensive theological study with a shortened period of military service over five years.

For these young religious Zionists, serving in the army to defend the state of Israel and the Jewish presence in the occupied West Bank is a crucial element of a theology that has the redemption of the biblical land of the Jews at its centre.

But some critics fear the influence and advancement of these highly motivated soldiers could turn the traditionally secular IDF into an ideological instrument and create conflicts over whether the men's duty is to obey their rabbi or their commanding officer.

Gabriel Slater, 20, a hesder yeshiva student who will begin army service within weeks, said the programme had helped him to develop strongly held ideological and religious goals. "I have deep beliefs and I'm going to the army to fulfil them," he said. He expected to face dilemmas – "moments of difficulty" – in the military and planned to consult his rabbi if he felt he was being asked to "cross a boundary".

The most apparent points of tension recently have concerned army ceremonies in which women soldiers take part in singing. Some rabbis advised religious soldiers to refuse to attend or to walk out, on the basis that women singing in front of men is forbidden under Jewish law.

But there are bigger questions about whether such soldiers will agree to participate in military operations to evacuate Jews from West Bank settlements, a small number of which have this year been declared illegal by Israel's supreme court. If there is ever a peace deal with the Palestinians requiring a large-scale evacuation of tens of thousands of settlers, the issue could become critical.

According to Gershom Gorenberg, the author of The Unmaking of Israel, this is not a problem of individual conscientious objectors. "There are already whole units that the IDF fears using. As men who believe in the inviolable sanctity of the Whole Land of Israel climb the ladder of command, possibilities loom that are worse than refusal: outright mutiny, even decisions by senior officers to deploy their units to prevent withdrawal," he writes.

Pro-settler religious Zionists are reaching the higher ranks of the military, according to Gorenberg. He cites the army magazine Bamahane, which reported in 2010 that one in eight of company commanders in ground forces came from West Bank settlements; the same year, a majority of top commanders in the elite Golani brigade were religious Zionists. "In the frontline forces and officer class, the role of men whose identity has been shaped in the crucibles of theological nationalism keeps growing," writes Gorenberg.

Daniel Brooks, 23, a student at Har Etzion, a hesder yeshiva just over the pre-1967 border in the southern West Bank, served as a paratrooper for 16 months as part of the programme. "There is an intrinsic value in learning Torah, and going to the army is a way of putting that learning – the value of protecting your people and land – into practice," he said. He served in a unit reserved for religious soldiers.

Har Etzion, which has more than 400 students, about half of whom are in the hesder programme, is relatively liberal on an overwhelmingly conservative spectrum. "We are not in the mainstream of religious Zionism," acknowledged Rabbi Moshe Lichtenstein, one of its leaders.

For example, it does not advise its students to leave if women sing at military ceremonies, and Lichtenstein said it was "destructive to this country" for soldiers to refuse orders. "Everyone has red lines," he said, some moral, some religious. "The military is simply a prism for tensions in society."

At the other end of the spectrum, Har Brakha, a yeshiva based at a radical Jewish settlement in the hills close to the West Bank city of Nablus, was excluded from the IDF-backed hesder programme 18 months ago after its leader, Rabbi Eliezer Melamed, said religious soldiers must disobey military orders if they conflicted with beliefs.

Melamed instructed that it was "forbidden for a Jew to throw another Jew out of his house in the land of Israel", said Yonaton Behar, Har Brakha's spokesman. "It is forbidden to give any part of the land of Israel to any non-Jew, especially our enemies. It is forbidden for any Jewish soldier to obey an order that contradicts the Torah."

Since Har Brakha's expulsion, "we've grown even faster", said Behar. "Israeli youth have a good sense of where the truth is, what the right path is. Many decided to come here to study because of what Rabbi Melamed teaches." Prayers start at 7am, and study continues until 11pm. "The serious guys also go through the night. These boys are very ideological."

The yeshiva has 100-150 students, some of whom are in the army despite Har Brakha's exclusion from the programme, says Behar. "And we have hundreds who continue to do their reserve duty. No one here is against the army. We believe serving in the army is a commandment from the Torah to defend the land."

Creating special units for religious soldiers, which are rarely ordered to participate in controversial frontline operations involving Jewish civilians, is an attempt to minimise conflicts. The army has also sought to avoid confrontations over singing ceremonies, although it said its official policy was that "female soldiers will continue to sing at IDF events [and] official IDF events are compulsory for all soldiers". However, it lets religious soldiers be absent, with permission, from social events.

According to Gorenberg, each minor concession by the army empowers the pro-settlement religious Zionists. "There is a tension here between an ever more stringent insistence on religious authority, and the authority of the military which reflects more liberal values," he said.

"In trying to accommodate and integrate religious soldiers into the army, it's critical that it's clear that there is one authority over the military, that of a democratically elected government working within constitutional constraints and a framework of human rights. That's an absolute foundation of a democratic society, and no one, including a politicised clergy, should be able to overrule that."