Car bombs rip through crowded markets, and security checkpoints choke life in the sprawling Iraqi capital. But here in this gleaming mall in central Baghdad, shoppers are greeted by a 30-foot-tall Christmas tree as they make their way past shiny Clinique counters and $100 Nikes.

The Mansour Mall — Baghdad’s newest and biggest shopping complex — has given the city’s residents a refuge from the daily bloodshed on their streets, much of which is attributed to the Islamic State militant group or radical Sunnis loyal to its cause.

Since an Islamic State rampage in the summer, Baghdad and its suburbs have suffered the highest number of civilian casualties, with the exception of Anbar province, according to the United Nations. The Islamic State, which seized vast swaths of northern and western Iraq during its blitz, controls a majority of Anbar.

[Related story: Pope writes letter to comfort Mideast Christians]

But at the Mansour Mall, Iraqis line up to watch American movies at the seven-screen cinema and feast on greasy pizza in the food court. This Christmas, the festive decorations of colored lights, whimsical ornaments and tiny Santa figurines inside the mall present a surreal contrast to the grim cement blast walls and sectarian tensions outside. Majority-Shiite Iraq has a rapidly dwindling community of Christians, as well as a sizable Sunni minority.

The cosmetics counter inside a store at Mansour Mall in Baghdad. (Erin Cunningham/The Post)

“We come here all the time, to get away from the mood on the street,” said Ammar Nasser, 25, browsing with his wife. “It’s something unique in Baghdad, and we love everything about it. It’s so much better than walking around outside, where we don’t know what will happen.”

When it opened last year, the $25 million mall, an Iraqi-Turkish venture, had seemed an ambitious and almost foolhardy project.

After a brief period of calm starting in 2010, Sunni militants had begun staging devastating attacks in Iraq, revitalized by the increasingly sectarian civil war in next-door Syria. Iraq’s political landscape also had grown more fractured as a Shiite-led coalition government appeared to be crumbling and the semiautonomous Kurdish region in the north flexed its muscles.

But even amid the turmoil, Iraq’s oil-fueled economy was growing fast. The gross domestic product per capita had risen from $1,300 in 2004 to $6,300 in 2012. Oil production had reached 3.3 million barrels per day in 2012, according to the International Monetary Fund.

The Mansour Mall investors pushed ahead.

“As you can see, business is very good,” said Fares Hilal, the administrative director of the mall’s bustling cinema.

This month, it is screening “The Hobbit: The Battle of the Five Armies” in 3-D, the World War II drama “Fury,” starring Brad Pitt, and the 2013 family movie “Alone for Christmas.”

The interior of Mansour Mall in Baghdad. (Erin Cunningham/The Post)

“Iraqis prefer American movies. They love the action. They love the comedy,” Hilal said, as swarms of teens jostled around him for giant sodas and buckets of buttered popcorn. It was a Thursday night, the last night before the weekend in Iraq, and the four-story mall was packed. Just below the theater is an amusement area for children, with bumper cars and an inflatable slide.

“If the theater was outside on the street, we couldn’t do it. It’s not safe,” Hilal said. “But here we are safe. We are in a secure place.”

Indeed, entering the mall entails going through three security checks. At the entrance to the parking lot, security guards wearing flak jackets and toting assault rifles write down license-plate numbers and inspect each vehicle for explosives. A separate group of guards then searches bags and pats down shoppers. The final check includes a metal detector and an X-ray machine.

In the food court, the knock-off restaurants — Krunchy Fried Chicken, Pizzarro, Subz — amuse Iraqi American Ansam Gadham, 40, who is temporarily living in Baghdad while her husband waits for his U.S. permanent-residence card. But then she starts to list the real international brands on offer at the mall.

“Timberland, Clarks, Ecco,” she said. “When I saw the Clinique booth, I was like, ‘Okay!’ ”

Some of the patrons find the mall too pricey. But they come anyway — to socialize and relax, without spending money. Last year, mall management hosted a lavish New Year’s Eve party that drew thousands, who mingled and danced in the spacious foyer. This year, managers said, they are still planning the festivities.

Ahmad Malik, manager of a Kigili men’s clothing store, says Christmas has been busy at the mall, as it was last year — even as the city’s Christians, constantly under threat from Sunni militants, continue to flee.

The mall’s holiday decorations and towering Christmas tree “are a message to the people that despite what we’re going through, the Iraqi people are still united,” said Mohammad Mahdi, a professor of sociology at the University of Baghdad.

“We can’t display these things everywhere in Baghdad,” he said. “But this mall is a place where all the communities meet.”

Mustafa Salim contributed to this report.