Long before it became famous as a battlefield in the fight against the Islamic State group, the Iraqi city of Mosul was known for its ancient cuisine, enriched by Syrian, Turkish and Persian recipes.

Mosul chefs make savory meat pies known as kubbeh and spicy flatbread smeared with ground beef, which can be found in Middle Eastern restaurants the world over. But among Iraqis the city is known for pache (PAH-chay) — animal heads, intestines and other parts boiled in giant vats.

It's an acquired taste, to be sure. But for many of Mosul's far-flung residents, displaced by more than two years of war, it's a reminder of home. Iraq's second largest city fell to IS militants in the summer of 2014, and Iraqi forces are now locked in a long and grinding battle to drive them out.

At the Famous Mosul Pache restaurant in central Baghdad, Mohammed Ahmed, the Mosul-born owner and head chef, supervises the splicing of hooves and the transfer of boiled intestines stuffed with rice from giant tankards of broth to a fryer for crisping. He also keeps an eye on the simmering heads, their teeth crudely bared.

Young waiters shuttle back and forth with platters of pache, which is boiled in a fatty broth seasoned with lemons and onions, and served over a pile of pita bread.

The dish, which can be made with beef or lamb, is relatively inexpensive. In more freewheeling times, it provided an oily sustenance to those staggering out of Baghdad's once-famous bars and cabarets.

Aamer Khalid, a Mosul-born customer who has been coming to the joint from the beginning, says that when it opened, some of the other patrons "didn't really know about pache."

Like chef Ahmed, Khalid fled the city when IS took over, and now lives in the Iraqi capital.

"Those who came once became regulars," Khalid added. "The pache is Mosul-style."

Close to the borders with Turkey and Syria, Mosul has been a crossroads of civilizations for thousands of years. The oldest known recipes in the world come from Iraq, and were inscribed on Babylonian tablets going back to 1700 B.C.

"There are 33 separate recipes, preserved on three different cuneiform tablets," said Tate Paulette, a postdoctoral fellow at Brown University who studies Mesopotamian cuisine. "Most of these have to do with the cooking of different types of broth, either meat or vegetable-based, and flavored with a variety of herbs."

It's hard to compare modern Middle Eastern cuisine with its ancient predecessors — for one, the Babylonians appear to have been fond of pork, which is forbidden by Islam and virtually nonexistent in Iraq.

But Paulette says both cuisines would have included dates, different types of leavened and unleavened bread, and spices such as coriander, cardamom, cumin, mint and garlic.

Many of the recipes involve boiled meat. Ahmed, who learned the trade from his uncle, might be preserving an ancient legacy.

"It's well-known that Moslawis specialize in pache," he said, referring to Mosul residents. "God willing, they will liberate Mosul and I will return and start another restaurant there."

The embattled city is never far from the minds of Iraqis who flock to Ahmed's restaurant.

"Mosul is a huge wound and no one can heal it," said a customer, Waleed al-Obaidi, as he reached his hand into a plate of pache. "Mosul is Iraq."

Khalid says the pache reminds him of home. "I feel like I'm there again," he said.

He also remembers how affordable the food was back in his city. "These meals you eat in Mosul are cheaper by far than in Baghdad," Khalid said. "They call Mosul the mother of the poor."

He knows where he wants to go for his first meal when he returns — the restaurant district in Dawasa, for a quzi sandwich made with a chunk of lamb cooked in a spicy tomato sauce.

The same area had places serving pache, Khalid remembers. There was also Bab al-Jedid, famous for kebab and other grilled meats.

Many who left Mosul hope that their city, battered by years of war and brutalized by IS, will retain its immoveable feast.

"God willing, we will go back, and God willing, Mosul will be liberated," Khalid said.