When singer-songwriter Mohsen Namjoo takes the stage at Stanford University on Friday and Sunday, he will be doing what he was never able to do in his homeland of Iran: perform in public.

Dubbed the “Iranian Bob Dylan,” Namjoo created music that led to his banishment from Iran even as his young fans there, who discovered his performances on YouTube, were becoming mesmerized by his poetic protests against the theocracy and its endless crackdowns.

“What the Iranian people want is to be energized,” he says through a translator. “My poetry is a poetry of protest for this time.”

But for now, Namjoo cannot reach the audience he most wants, except via the Internet. “It must be (made) clear that if I could work and create freely, I would prefer to live in Iran,” says Namjoo, 33. He was labeled a blasphemer for setting to his music a portion of the Quran, and later sentenced to prison in absentia by a Tehran court. Namjoo left Iran in 2007, and is now a visiting fellow at Stanford while he seeks permanent residency in the U.S.

“Any time the situation permits, I will return,” he says. “The Iranian regime is not a monolith. Right now, there are people within it who can be respected, and there are people who are just generally mad.”

But sending a negative message was not his goal; it just happened because his feelings ran so deep — growing out of a Persian tradition of music imbued with layers of veiled, poetic meaning.

Blending Dylan, blues and the poet Rumi, Namjoo ranks as “the most daring musician and composer of modern Iran,” says Abbas Milani, head of Stanford’s Iranian studies program. He says the composer’s songs feel ancient yet rock — and grab listeners, speaking to Iranian disillusionment, for instance, over the government’s recent suppression of popular protests over national elections.

Still, Namjoo distances himself from “mere political proclamation. I have to tell you that my only career is music. … I don’t delve into Islam,” he says. Later, he adds, “For me, the primary thing is the aesthetic of music — and of course, so much the better if, while rendering a musical work beautifully, there is also a message expressed.”

His songs — which have had about 2 million hits on YouTube — are celebrated for their unorthodox musical fusions and Farsi word play and reflect the frustrations of many Iranians, especially artists and intellectuals.

Still, even non-Farsi speakers will sense what disturbs the Iranian culture police about Namjoo, who describes himself as “not particularly religious.” On his new CD, “OY,” he lapses into English on the tune “Hammash,” paraphrasing the lyrics of “Bang, Bang (My Baby Shot Me Down),” the 1960s hit by Cher.

It’s easy to figure out who’s getting shot, and why Namjoo is seeking residency here, after touring twice in America in the past 18 months. And it isn’t difficult to understand why his song “Shams,” named after a chapter of the Quran, is controversial.

In “Shams,” Namjoo performs verses from the holy book. That raises the ire of those orthodox Muslims who consider recitation of the Quran to be blasphemous outside of devotional settings, let alone as part of a rock tune that resounds like the Clash.

About two years ago, when an early pirated version of “Shams” was posted on YouTube, Quran societies in Iran likened it to Salman Rushdie’s novel “The Satanic Verses.” Last year, an Iranian court sentenced Namjoo in absentia — he was studying at the University of Vienna at the time — to five years in prison.

“They hate him,” says Iranian filmmaker Babak Payami, who produced Namjoo’s new album. “But something is changing in Iranian culture — the disintegration and dissolution of taboos — and Mohsen’s music is a big indication of that shift. He hits the bull’s-eye.”

Namjoo puts it differently: He is trying to prove the “universal commonality” of musical forms. A master of the Persian lute known as the setar, Namjoo also plays guitar and is a fanatic student of Western pop: Leonard Cohen, Radiohead and Eric Clapton are among his heroes. He is working on a “Persianized” version of Clapton’s “Layla” and is smitten with British R&B singer Amy Winehouse: “I love her,” he says, blushing. “I love her singing.”

He was raised in Mashhad, an important city of pilgrimage for Shia Muslims in northeastern Iran. His father was an accountant in the mayor’s office, his mother a homemaker, raising Mohsen and his six brothers and sisters.

His family expected him to become an engineer, he says, laughing. Instead, he attended the University of Tehran’s prestigious College of Fine Art, studying music and theater. He was trained by masters of Persian classical music, poetry and literature.

But while still in his teens, he came under the spell of his friends’ collections of Western recordings: Stravinsky and Satie, the Doors and Dylan. He was tickled to discover that it takes only a slight tweaking of scales and melodies to bring music of the East and West into alignment.

Crouched over his setar, growling his vocals in a Stanford rehearsal hall on a recent evening, Namjoo seemed to embody the East-West alignment he describes. “The arts,” he says, “are the very heart of human communication.”

Richard Scheinin covers residential real estate for the Bay Area News Group. He has written for GQ and Rolling Stone and is the author of Field of Screams: The Dark Underside of America’s National Pastime (W.W. Norton), a history of baseball. During his 25-plus years based at The Mercury News, his work has been submitted for Pulitzer Prizes for reporting on religion, classical music and jazz. He shared in the Pulitzer Prize awarded to the Mercury News staff for coverage of the Loma Prieta earthquake. He has profiled hundreds of public figures, from Ike Turner to Tony La Russa.