Roni Daniel saw the writing on the wall in a toilet.
A former infantry commander who fought in three Middle East wars and now the dean of Israeli defence correspondents, Daniel recently visited military headquarters in Tel Aviv. There, a urinal that uses a motion detector to clean itself was signposted: Forbidden on the Sabbath. Troops, he realised, were being ordered to defer to Orthodox Jewish curbs on the use of electricity between Friday night and Saturday night.
For Daniel, and for millions of other Israeli citizens, the sign is symbolic of creeping change in an institution long cherished as a bastion of national unity. An increasing number of conscripts are Orthodox Jews - mirroring the growth of the minority in Israeli society at large. Some religious troops view military service through the prism of their own piety - either as the realisation of a messianic vision that sees Jews conquering biblical lands or as an institution that should be subordinated to rabbinical writ.
For secular Israelis, already worried about the role of religion in the Jewish state, that threatens not just the military but the country itself.
In my time, the skullcap-wearers came to the military and served alongside me. They lived their lives as they pleased, we respected them, and they also respected our lifestyle, said Daniel, who is 64 and secular. Today's generation, to a degree, joins up with the object of imposing its lifestyle on others - to dictate how to behave. It's a crawling annexation.
IDF top brass say religion is not threatening the chain of command. No rabbi will run any of my units, chief of staff, Lieutenant-General Benny Gantz, told Israel's top-rated Channel Two news last month.
THE LADDER OF COMMAND
The IDF has always been a Jewish army. Its rations are kosher, its chaplains are rabbis, and it operates - with the exception of wartime - around the festival calendar. It has never drafted soldiers from Israel's 20-percent Arab minority. But its Jewish identity has always been more cultural than religious.
IDF personnel data suggests that's changing. Around 57 percent of Israel's Jewish majority, census figures show, define themselves as religiously observant to some degree. Two relatively small but distinct groups of religious Israelis are growing both in numbers and in power: the ascetic, often apolitical and ultra-pious haredim, who join up despite their community's exemption from conscription; and pro-settlement Orthodox Jews, whose dogma focuses less on religious rite and more on the sanctity of Israel's fight for territorial expansion.
There were 5,800 haredi soldiers last year, according to the military, up more than a quarter from 4,600 in 2007. Those soldiers serve in a dedicated infantry battalion as well as in technical units designed to provide the troops with a trade when they return to civilian life. The haredi presence may grow even further following a Supreme Court ruling last month that struck down the law that helped ultra-Orthodox men avoid conscription.
The other group of devout soldiers is harder to pigeonhole. Many come from settlements in the West Bank - the cradle of Judaism and a territory where Palestinians seek statehood - and display a disproportionate drive to join combat units as well as the officer corps. A 2010 study cited by the official military journal Bamahane said 13 percent of company commanders - the key junior officers with arguably the most immediate sway over their troops - lived in West Bank settlements, for instance. By comparison, settlers made up just 2.5 percent of Israel's total population. Maarachot, the Defense Ministry journal, published figures showing that the percentage of Orthodox infantry officer cadets rose from 2.5 percent in 1990 to 31.4 percent in 2007.
Those changes have real-world ramifications. The army has long used musical bands, including women soldiers as singers, at memorials for dead soldiers. Such events were once a matter of consensus, a badge of egalitarianism for the IDF which conscripts thousands of secular Jewish women. But puritanical rabbis consider women's singing to be a sexual temptation, and requests by religious troops to be excused from the events snowballed into open calls for boycott last year.
Chief of staff Gantz fired back by insisting on compulsory attendance for all. Rabbinical recriminations followed. Moshe Ravad, an air force lieutenant-colonel and chaplain in charge of encouraging the ultra-Orthodox to enlist, resigned in protest in January.
The flap coincided with much-publicised Israeli outrage at forcible gender segregation in ultra-Orthodox communities and added to the sense that society was shifting. The military's chief rabbi, Brigadier-General Rafi Peretz, said Ravad had undermined both a core project and a wider national effort to maintain harmony within the armed forces.
Speaking to the conservative Israeli newspaper Makor Rishon, Peretz said that for the sake of army unity he would counsel religious soldiers to attend formal events where women sing.
(They should) go in, because we are anxious to preserve the state, the military, the nation's arising and the beginning of our redemption, Peretz said, combining in one sentence secular Israeli terms of cohesion with hints of an end-of-days prophesy.
But Peretz, a clean-shaven former helicopter pilot, also said that the future could favour religious troops. During his air force training, he said, we had to conduct test flights on the Sabbath as well, and I would fly. A few years later, we asked the military if this was really necessary, and they changed it. The military takes into account where things stand.
Such statements inflame concerns among liberal Israelis that their religious compatriots - who tend to have larger families and often mobilise for conservative political causes - might use the military to help strengthen their cultural and electoral clout.
IN THE SETTLEMENTS
Memories are still fresh of Israel's 2005 withdrawal from Gaza, in which dozens of religiously observant soldiers were disciplined for refusing orders to remove settlers from the coastal enclave. How might a similar plan to quit the occupied West Bank fare?
Some religious soldiers worry that Israel's demolition of unauthorised settlement buildings in the West Bank may lead to the forced removal of all settlers. A few soldiers have staged spectacular public protests, violating the separation of army and politics required by law. In late 2009, for example, infantrymen disrupted their own swearing-in ceremony at Jerusalem's Western Wall by hoisting a banner declaring that they would not help raze settlements.
The agitprop has extended to vandalism. Three soldiers were arrested in December on suspicion of damaging West Bank property - both belonging to Palestinians and to an Israeli military garrison - as part of so-called Price Tag attacks designed to signal to the government it will pay for curbing settlers.
As men who believe in the inviolable sanctity of the Whole Land of Israel climb that ladder of command, possibilities loom that are worse than refusal: outright mutiny, even decisions by senior officers to deploy their units to prevent withdrawal, said Gershom Gorenberg, author of The Unmaking of Israel, which examines the political clout of pro-settler religious Jews.
In a democracy it is critical that the army is totally subject to the decisions of an elected government and that there is not concern that other political or ideological groups have an influence on the decisions made by soldiers or officers, Gorenberg said.
But in Eli, a predominantly Orthodox settlement deep in the West Bank, mayor Kobi Eliraz dismisses talk of a religious takeover of the army. Almost one in 10 Eli households is headed by career soldiers. The settlement houses a bustling seminary where religious youths can study for a year between high school and the draft, and around half of whose alumni go on to become officers.
There's a joke that whenever there's an IDF operation on, Eli empties of men, Eliraz, a former Jewish seminary student and infantryman, said.
Indeed, two residents from Hayovel, a smaller town governed by Eli, have died leading military operations in the past seven years.
The Israeli government lists Hayovel as an illegal outpost. What would residents there do if the Israeli government moved in to destroy it?
Mayor Eliraz, himself a Hayovel resident, reckons that is unlikely, but answers the question with studied graveness.
We would exhaust all legitimate means to block it, but if worse came to worse, we would comply, he said. We completely identify with the state. We aren't coming to change it.
At the same time Eliraz, Gorenberg and others foresee change coming naturally, as religious communities increase in relative size and influence.
I just assume that the same will happen in the IDF as in wider society, Eliraz said in his office overlooking the craggy hills around Eli.
Gorenberg said it was up to the military brass to maintain religious troops' respect for the chain of command and ethical codes. The army has to take a stronger stand against refusing orders and political expression, he said. There is no trend that is irreversible, and no factors are fixed in stone.
For infantryman-turned-reporter Daniel, that's a frightening prospect. The military leaders from Israel's nationalist-religious community are excellent, he says. There won't be any question about them knowing how to fight the Syrian army or Hezbollah. But in Israel, the military has other roles, like evacuations. A military split between the secular and the religious is destined to fall apart.
(Edited by Simon Robinson and Sara Ledwith)