(CNN) Iran's Supreme Leader has written a letter in English asking Western youths not to judge Islam based on the Charlie Hebdo terror attacks , in a message published on the cleric's website and Twitter account.

In the post, titled "To the Youth in Europe and North America," Ayatollah Ali Khamenei calls on young people to seek out their own understanding of Islam, and he criticizes the media's portrayal of Muslims following the massacre of 16 people at the French satirical magazine and at a kosher supermarket in Paris this month.

"The recent events in France and similar ones in some other Western countries have convinced me to directly talk to you about them," Khamenei's letter reads. "I am addressing you, [the youth], not because I overlook your parents, rather it is because the future of your nations and countries will be in your hands; and also I find that the sense of quest for truth is more vigorous and attentive in your hearts."

The Paris attacks, which have provoked a wave of anti-Islam protests in the West , were retribution for Charlie Hebdo's lampooning of Islam over the years. The magazine's first issue after the attack, which features a caricature of the Prophet Mohammed on its cover, has sparked demonstrations across the Muslim world.

But the leader of Iran , where chants of "Death to America" have been a familiar refrain at Friday prayers and parliamentary sessions since the Islamic republic's founding in 1979, strikes a more conciliatory tone in his message to young people in the West.

"I don't insist that you accept my reading or any other reading of Islam," his letter reads. "What I want to say is: Don't allow this dynamic and effective reality in today's world to be introduced to you through resentments and prejudices. Don't allow them to hypocritically introduce their own recruited terrorists as representatives of Islam."

Don't allow the arrogants to hypocritically introduce their own recruited terrorists as representatives of Islam. #ISIS #BokoHaram #Letter4U — Khamenei.ir (@khamenei_ir) January 21, 2015

Khamenei also riffs on Western history, explaining that the United States and Europe have a long tradition of oppressing people of "color and non-Christians."

He describes his admiration for chastened Western historians who are, in his words, "deeply ashamed of the bloodsheds wrought in the name of religion between the Catholics and Protestants or in the name of nationality and ethnicity during the First and Second World Wars."

Khamenei calls on readers to ignore media portrayals of Islam: "Receive knowledge of Islam from its primary and original sources. Gain information about Islam through the Qur'an and the life of its great Prophet," he writes.

"Why does the power structure in the world want Islamic thought to be marginalized and remain latent?" Khamenei asks readers to ask themselves, then: "I would like you not to allow the derogatory and offensive image-buildings to create an emotional gulf between you and the reality."

The Supreme Leader finishes with a hopeful message that "future generations would write the history of this current interaction between Islam and the West with a clearer conscience and lesser resentment."

Khamenei's letter comes at a time of thawing relations between Iran and the U.S., as the two longtime adversaries try to hammer out a deal on the future of Iran's nuclear program.

But diplomatic progress has not stopped the Ayatollah from bashing the West on social media in recent months. He called the U.S. the "enemy" on Twitter two weeks ago in a tweet about nuclear talks, and in August he blasted the treatment of African-Americans in a tweet about the protests after the police killing of an unarmed black teen in Ferguson, Missouri.