"Line up!" On the order, 44 nervous Israeli recruits stepped into formation. One stood still. Shaking slightly, the only person to find himself out of line in a Tel Aviv draft centre then opened his mouth to say the seven words that would lead to an interrogation in the so-called 'weirdo' room – the Ta Harigim – "I refuse to serve in the army". Then, for Moriel Rothman, it would be jail.

Each year the Israeli Defense Forces (IDF) conscripts 18 year olds who have finished school for a period of military service. It's two years' long for women, three for men, and most, like those either side of Rothman, step forward as expected.

The IDF was founded alongside the Israeli state in 1948 with a double purpose in mind. First, it was meant to keep the country safe from the threat of Arab invasion. Second, as immigrants flooded into former Palestine, the army, it was hoped, would glue together the wildly different peoples – Bulgarian, American, Libyan, German – that made up the new nation. As of 2013, the force is stronger than ever militarily, with nearly 500 aircraft and 3,000 tanks combat-ready. It is that second foundational principle – of the IDF as the 'Army of the People' – that now finds itself under threat.

Download the new Independent Premium app Sharing the full story, not just the headlines

Conscientious objectors like Moriel Rothman form only a minor part of the problem, treated with a mixture of bafflement and disdain by high command. A Conscience Committee exists to hand out exemptions to those deemed true pacifists. At first, Rothman, aged 22, applied to it, but support for the Palestinian cause, he believes, saw his case rejected. As we eat lunch in a café in an Arab area of West Jerusalem, he explains: "I told the Conscience Committee I work against violence and the occupation". (Rothman works for a documentary-making NGO called Just Vision.) "My theory is the second I said 'occupation' they froze up."

This left the devoutly Jewish young man with two choices: visit a psychiatrist for a sick-note, or refuse publicly and face the consequences.

"I was feeling exhilarated and nervous," says Rothman of the moment he opted for the latter. "Right after I said 'I won't serve' to the first commander, he marches off to find someone to take me away." Two stretches in jail followed last autumn, both 10 days long. Though short, these sentences can be brought against refuseniks on repeat (Natan Blanc, a peer of Rothman, served 10 of them, spending 178 days in jail).

Rothman coped well with being inside, despite the loneliness and a worry about how his then-girlfriend might react to more time apart. Being an Israeli in an Israeli jail helped. "The [guards] are being mean, they're yelling a lot, they're slamming the doors, and they're taking away your shoelaces – but I wasn't afraid they were going to keep me there forever and I wasn't afraid they were going to hurt me physically."

If there was a shock for Rothman, it was the prisoners' uniform, a hand-me-down from the US Marines - logo still intact. The irony didn't pass him by. Though born in Jerusalem, a Western upbringing and education, including a degree in Arabic and Political Science from Middlebury College in Vermont, helped to land Rothman in Israeli jail.

"If I'd stayed here aged 18," he says, speaking of a three-month visit, "I would have served. I would have gone down the normal path. It's astonishing how little the kids here know about what the occupation even is."

Pausing for mouthfuls of falafel, Rothman gives a blow-by-blow account of overlooked injustices. He cites a legal system that's biased against Arabs, unfair land distribution, an apparent callousness to civilian deaths in 2008's Operation Cast Lead – and the wall still under construction that separates Israel from the West Bank, splitting Palestinian villages in its path.

Daily coronavirus briefing No hype, just the advice and analysis you need Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive morning headlines Monday - Friday plus breaking news alerts by email Update newsletter preferences

The tipping point for Rothman came in June 2012, when he joined protesters on the front lines in the village of Susiya, near the Palestinian city of Hebron, fighting against the planned demolition of 50 buildings, and a cluster of German-funded solar panels. His pitch rises as he remembers: "There at the protests you come face-to-face with these kids, these IDF soldiers who are there, whether or not they like it, to protect the bulldozers or to arrest the citizens who try to stop their homes from being demolished."

Susiya was spared, temporarily. But presented with a plausible vision of his own future, rifle in hand, Rothman decided he couldn't serve in the IDF. When we meet, five months have passed since the end of November's jail sentence, and life has slowed down. The threat of more time in prison has passed too, after a certificate confirming Rothman's sleep troubles was shown to the authorities . Before walking back to work he stresses one final point. "I have nothing but the strongest love for the Israeli people. I was not struggling against anyone, not against settlers and not against soldiers. I was struggling against the occupation."

Over the past six months that sore has seeped more than its usual level of poor publicity. In April, the EU called for an end to the "forced transfer" of Palestinians out of their homes in the West Bank, while a June UN report records widespread maltreatment of Palestinian children – up to 7,000 of whom they say have been jailed over the past 10 years, mostly for throwing stones.

However, a rightward swing in Israeli politics – seen in the emergence of far-right parties such as Naftali Bennett's The Jewish Home – has left protesting voices like Rothman's on the margins. "There has never been a better time for the occupation," says Yehuda Shaul, founder of Breaking the Silence, an NGO that encourages former IDF soldiers to speak out about injustices they see during service.

Meanwhile periodic Hamas rocket attacks on Israel have turned sympathy away from everyday Palestinians, and the legacy of a spate of horrific suicide bombings during the Second Intifada (2000-2005) lingers on. When mass left-wing protests did erupt in 2011, the focus was on social problems – such as rising inequality and the cost of living.

Here, the IDF offers a kind of balm. An egalitarian spirit still holds strong in the army and the 'melting pot' of barracks-life allows rich and poor to mix. A soldier I spoke to noted that though one 18 year old in his unit drove a sports car to the base, other recruits had to wear their uniforms to travel on nights out – taking advantage of the free public transport that comes with badge and beret.

For soldiers, especially those in liberal Tel Aviv, the political uproar that surrounds the army in Israeli society can be barely audible, hushed by routine and hard work. The last thing to exert total control of mess-hall gossip wasn't so much skirmishes on the Syrian border but a video posted online of three female soldiers pole-dancing around a rifle, spanking each other.

But in the longer term, and to the anxiety of the Knesset, the People's Army faces a profound structural challenge – one stemming from the changing make-up of 'the people' themselves. As of February 2012, both Arabs and ultra-Orthodox Jews (or 'Haredim') were exempt from service in the IDF; Arabs because of their likely allegiance to Palestine over Israel, Haredim because of their traditional duty to study the Jewish Torah.

This status quo held latent difficulties. Between them, Arabs and Haredim currently make up around 30 per cent of Israel's eight million-strong population. But owing to the high birth rates of these two groups, almost half of the kindergarteners in Israel this year are either Haredi or Arab. Were exemptions allowed to go on, the number of people skirting service could eventually outweigh those conscripted. As a result, in February last year, the Tal law – which had exempted Haredim from service since the birth of Israel – was not renewed.

Ensuing negotiations have brought the government to the point of collapse. Prime Minister Binyamin Netanyahu's Likud party leads a shaky coalition, featuring centrist Yesh Atid of There is a Future, a party which won election with a promise to make Haredim "share the burden" of service. Their pledge resonates with much of secular Israel. Haredim, obeying the Torah commandment to "be fruitful and multiply", tend to have large families – and few find paid work. As a result they receive a disproportionate amount of state welfare. Under draft legislation passed by Israel's cabinet in July, by 2016, 80 per cent of Haredim will do national service, with draft-dodgers facing a hefty fine or jail.

Eli (not his real name), aged 27, is one of the small proportion of Haredim to have already completed military service. Eli joined the army through Project Shahar, an initiative which provides ultra-Orthodox men with technical and logistical positions in the IDF and offers them employment training to find work afterwards (according to IDF data, 90 per cent go on to do so).

Leaning forward on a chair in the Shahar offices in Bnei Brak, a Haredic area to the east of Tel Aviv, Eli is frank about the complications of service. "The Haredic sector considers the army as something not good," he says, speaking in Hebrew. They have reason to fear; the Haredi way of life, focused on learning and studying the Jewish Scriptures, the Torah and the Talmud, imposes a strict code of conduct on its members, from dress (mostly black, with a wide-brimmed hat) to food (glatt kosher only). Most notably, men and women are dissuaded from consorting in public view.

"The army does try and suit itself to people like me," says Eli. "But it's an ongoing source of tension, and it could be improved."

Ongoing is right. In January, the Chief Rabbi of the Israeli airforce and leader of the Shahar programme, Lt Moshe Ravad, resigned after the IDF refused to allow Haredi recruits to skip ceremonies that featured female recruits singing. Eli himself, a conscientious young man, was troubled by the sight of a Haredi friend of his, an officer, sitting at lunch in the mess surrounded by women. "To sit together with girls, and chat around, it doesn't look good as a young Haredic person. It's something you don't expect to see," he says, shaking his head.

Fuelling the draft dispute is a fear that the modern IDF will dissolve the Haredic way of life. It is a risk, admits Eli. "Service did change my mind about many things," he says. Part of the reason for Haredi isolation from mainstream society has to do with an unwillingness to recognise the state of Israel, waiting instead for the return of the Messiah to found a Jewish Zion. Post-service, Eli feels "connected to Israeli society" in a way that he perhaps wasn't before, and now believes in the need for a Jewish state. "Maybe that's one of the things the Rabbis are afraid of."

Other, more personal, changes also followed for Eli. "The army gave me ambition to study electric engineering," he says, gesturing proudly to a shelf-full of textbooks. "The fact that you have to put in time to go forward, I learnt that in the IDF. We were brought up to think that all we have to do is learn the Torah and pray and God will help. Now we see we also have to do things ourselves."

These words will please Yesh Atid, but Eli – caught between discomfort with service and pride – stops short of calling himself a poster-boy for Haredim in the army. The poison of the debate troubles him. "The talk is very extreme, on both sides [secular and Haredi]," he says. "And it doesn't do good – for those [Haredim] in the army, and the ones that are thinking about joining."

Eli is a rare conciliatory presence: shortly before the passing of his grandfather, a respected and strict scholar, Eli won him over to the idea of service by speaking of a new sense of direction, and the concessions the army had made to his people.

In Arab society, too, young people are signing up. Since 2001, the number of Arabs volunteering for national civic service has jumped 76 per cent, with 2013's total (over 3,000) almost double that of 2012. Still, they remain outliers among Israel's 1.6m Arab population.

For Maria Zahran, aged 22, a law student at Haifa University, not enough has changed for Arab young people to greet the Israeli army with anything but suspicion. Currently interning at an NGO which defends Arab rights, she cites common ancestry with Israel's foes in Syria, Egypt and Lebanon, as well as more mundane discrimination in "applying for a job, building permits, land distribution and universities". As long as these obstructions remain, Zahran cannot foresee any softening in Arab popular opinion.

Of those Arabs who serve already, Zahran holds little but scorn. "The IDF knows that any Arab who joins is betraying his people, so can't be trusted," she says. Those who do enlist are "failures"; they "fail at school", or "they didn't pass the psychometrics exam, which allows them to study at university".

Zahran's aversion to the IDF would count for nothing, were it down to Avigdor Lieberman. The former foreign secretary wants any move to forcefully conscript Haredim to include Arabs. This claim was dismissed as bombast by some sections of the press, but Lieberman is not alone in thinking more needs to be done to get Arabs into national service.

Zahran's replies caustically: "If Israel makes it obligatory to join the army for Arabs, we will refuse. When they tried to stop us remembering the Nabka [the expulsion of Palestinians from Israel in 1948] we said, 'Prepare 1.2 million cells, because we will not stop'. We will say the same again."