At Baghdad's grand but half-empty railway station, a single train is sputtering to life. It is the newly revived daily service to Fallujah, a dusty town to the west once infamous as a Sunni insurgent stronghold.

The driver and conductor assure that the tracks running through Anbar province are now clear of mines planted by Islamic State and of collapsed bridges the group blew up when it marauded through western and northern Iraq in 2014.

The rapid advance of the militants shut down the line before US-backed Iraqi forces drove them out of Fallujah in 2016 and defeated them in Iraq in late 2017.

After a four-year hiatus, hundreds of rail passengers now travel the 30 miles between Baghdad and Fallujah in just over an hour. By car, the journey can take several.

"The train saves time. The Baghdad-bound leg arrives at 8 a.m., which suits my schedule. It's also cheaper" than by car at 3,000 Iraqi dinars ($2.50) for a ticket, commuter Thamer Mohammed said.

"You don't have to stop at checkpoints, and it's safer. You avoid road accidents," said the 42-year-old, a Fallujah resident studying for a history doctorate in Baghdad.

The revival in July of the daily service, once a feature of an extensive rail network dating back to the Ottoman empire, is a vivid example of Iraq's attempts to recover from decades of unrest.

Related: Fifteen years after the US entered Iraq, Baghdad breathes new life

Passengers see it as a metaphor for the country's state: security has improved enough to allow unhindered passage through countryside dominated for years by Islamic State and al Qaeda militants. But the train is dilapidated and shudders as it gathers speed.

The state of the tracks allow a steady pace of up to around 70 miles per hour — but no more. Dozens of windows have been smashed by children who play in the dirt in poor Baghdad districts and pelt carriages with stones as they cruise by.

"I hope the service will keep running, but in the last few days, there have been delays. Sometimes it runs out of fuel on the journey, or has technical failures," Mohammed said.

Abdul Sittar Muhsin, a media official for the national operator Iraqi Republic Railways, said the company was in dire need of funding to keep the service running.

"We did this with the company's money and we're operating at a loss," he said.

Regular passengers include unemployed youth looking for work, a perennial problem in Iraq where demonstrations over lack of jobs, water and power turned violent in the southern city of Basra in September.

"I had a job interview with an NGO today in Baghdad, but I'm not holding out much hope," said Yassin Jasim, a recent graduate with a degree in medicine. "I try to get casual work in Fallujah, but there's little and it's low pay."

Related: Raised by war: This is what it’s like to come of age in Iraq

An Iraqi policeman stands guard in a passenger cabin of the train on the way to Fallujah after leaving Baghdad Railway Station, the newly resurrected service to the city, in Baghdad, Iraq, Nov. 7, 2018. Credit: Thaier al-Sudani/Reuters

Baghdad to Istanbul

Jasim and his family moved to the relative security of Erbil in Kurdish-controlled northern Iraq while Islamic State held Fallujah.

The city and fertile countryside along the Euphrates river suffered a series of bruising battles after the US invasion in 2003 that toppled Saddam Hussein. Fallujah became infamous in 2004 when four American security contractors were killed and their bodies hung from a bridge in the city.

Everywhere are reminders of a delicate security situation. Armed police patrol the train, which runs past a scrapyard of cars destroyed during the fighting and the remains of a road bridge blown up by militants.

Railway officials hope to restore services all the way to the Syrian border. Iraq's rail network, developed during the British mandate period and under Baath party rule in the 1960s, used to stretch to Istanbul and Aleppo in Syria via Mosul in northern Iraq.

Conflict with Iran in the 1980s, UN sanctions in the 1990s and violence since then have wrecked most of the old network, apart from regular services to Basra and now Fallujah.

Related: After ISIS, will Iraq’s elections be the next step to stability?

Plans to extend beyond Fallujah might be ambitious — tracks are buried in sand and Iraqi forces have been reinforced at the border after recent Islamic State counter-attacks in Syria.

For now, the Fallujah line is a big step forward.

"It's great, I can regularly see my daughter now who is marrying a man from Fallujah," one woman said. "At the moment, things are fine."