ISTANBUL – In a state-of-the-art television studio here, the Islamic world’s version of America’s culture war is playing out in a lavishly re-created 16th century palace.

A dashing Turkish actor plays Suleiman the Magnificent, the Ottoman ruler who conquered vast swaths of the Middle East and Europe, granted basic rights to Christians and Jews, and promoted education, science and art.

To Turkish conservatives, the series maligns a revered ruler known as “the lawgiver” whose military prowess and legal reforms placed the Ottomans at the zenith of their power. Set in the palace harem, early episodes featured a young Suleiman cavorting with scantily clad women and drinking wine. The sex was frequent.

The show’s producers point to other themes. The dominant character is a woman, a real-life, Ukrainian slave-turned-concubine who eventually became Suleiman’s queen. And in the program, members of different faiths coexist.

“This is the most important thing of the Ottoman Empire, that allowed one family to rule for centuries,” Halit Ergenc, the actor who plays Suleiman, told me during a break in filming. “Sharing the same land with different cultures and different religions and respecting their rights.”