Image copyright ALAMY

The 19th Century Russian novelist Fyodor Dostoyevsky wrote about characters who justified murder in the name of their ideological beliefs. For this reason, John Gray argues, he's remained relevant ever since, through the rise of the totalitarian states of the 20th Century, to the "war against terror".

When Fyodor Dostoyevsky described in his novels how ideas have the power to change human lives, he knew something of what he was writing about.

Born in 1821, the Russian writer was in his 20s when he joined a circle of radical intellectuals in St Petersburg who were entranced by French utopian socialist theories. A police agent who had infiltrated the group reported its discussions to the authorities. On 22 April 1849, Dostoyevsky was arrested and imprisoned along with the other members, and after some months of investigation they were found guilty of planning to distribute subversive propaganda and condemned to death by firing squad.

The punishment was commuted to a sentence of exile and hard labour, but the tsar's authority to decree life or death was confirmed by forcing the prisoners to undergo the ordeal of a mock execution.

In a carefully stage-managed charade Dostoyevsky and the rest of the group were taken on the morning of 22 December 1849 to a regimental parade ground, where scaffolding had been erected and decorated with black crepe. Their crimes and sentence were read out and an Orthodox priest asked them to repent.

Three of the group were tied to stakes in readiness for execution. At the last moment there was a roll of drums, and the firing squad lowered its rifles. Reprieved, the prisoners were put in shackles and sent into Siberian exile - in Dostoyevsky's case for four years of hard labour, followed by compulsory service in the Russian army. In 1859 a new tsar allowed Dostoyevsky to end his Siberian exile. A year later he was back in the literary world of St Petersburg.

Find out more A Point of View is usually broadcast on Fridays on Radio 4 at 20:50 GMT and repeated Sundays 08:50 GMT

John Gray is a political philosopher and author of False Dawn: The Delusions of Global Capitalism Listen to A Point of View on the iPlayer BBC Podcasts - A Point of View

Dostoyevsky's experience had altered him profoundly. He did not abandon his view that Russian society needed to be radically changed. He continued to believe that the institution of serfdom was profoundly immoral, and to the end of his life he detested the landed aristocracy. But his experience of being on what he'd believed was the brink of death had given him a new perspective on time and history. Many years later he remarked: "I cannot recall when I was ever as happy as on that day."

From then onwards he realised that human life was not a movement from a backward past to a better future, as he had believed or half-believed when he shared the ideas of the radical intelligentsia. Instead, every human being stood at each moment on the edge of eternity. As a result of this revelation, Dostoyevsky became increasingly mistrustful of the progressive ideology to which he had been drawn as a young man.

He was particularly scornful of the ideas he found in St Petersburg when he returned from his decade of Siberian exile. The new generation of Russian intellectuals was gripped by European theories and philosophies. French materialism, German humanism and English utilitarianism were melded together into a peculiarly Russian combination that came to be called "nihilism".

We tend to think of a nihilist as someone who believes in nothing, but the Russian nihilists of the 1860s were very different. They were fervent believers in science, who wanted to destroy the religious and moral traditions that had guided humankind in the past in order that a new and better world could come into being. There are plenty of people who believe something similar today.

Image copyright Getty Images Image caption The execution of two nihilists in St Petersburg, 1880

Dostoyevsky's indictment of nihilism is presented in his great novel Demons. Published in 1872, the book has been criticised for being didactic in tone, and there can be no doubt that he wanted to show that the dominant ideas of his generation were harmful. But the story Dostoyevsky tells is also a dark comedy, cruelly funny in its depiction of high-minded intellectuals toying with revolutionary notions without understanding anything of what revolution means in practice.

The plot is a version of actual events that unfolded as Dostoyevsky was writing the book. A former teacher of divinity turned terrorist, Sergei Nechaev, was arrested and convicted of complicity in the killing of a student. Nechaev had authored a pamphlet, The Catechism of a Revolutionary, which argued that any means (including blackmail and murder) could be used to advance the cause of revolution. The student had questioned Nechaev's policies, and so had to be eliminated.

Image caption Eve Belton as Marya in a 1969 BBC adaptation of Dostoyevsky's novel Demons

Dostoyevsky suggests that the result of abandoning morality for the sake of an idea of freedom will be a type of tyranny more extreme than any in the past. As one of the characters in Demons confesses: "I got entangled in my own data, and my conclusion directly contradicts the original idea from which I start. From unlimited freedom, I conclude with unlimited despotism."

As a description of what would occur in Russia as a result of the Bolshevik revolution nearly 50 years later, this can hardly be improved upon. Though he criticised him for relying too much on individual acts of terror, Lenin admired Nechaev for his readiness to commit any crime if it served the revolution. But as Dostoyevsky foresaw, the use of inhuman methods to achieve a new kind of freedom produced a type of repression that was much more far-reaching than the theatrical cruelties of tsarism.

What Dostoyevsky diagnosed was the tendency to think of ideas as being somehow more real than actual human beings

Dostoyevsky's novel contains a lesson that reaches far beyond Russia. Early English translations bore the title The Possessed - a misreading of a Russian word more accurately rendered as Demons. But the earlier title may have been closer to Dostoyevsky's intentions. Though at times he is merciless in his portrayal of them, it isn't the revolutionaries who are demons. It's the ideas to which the revolutionaries are enslaved.

Dostoyevsky thought the flaw at the heart of Russian nihilism was atheism, but you needn't share his view on this point to see that when he writes of the demonic power of ideas he has fastened on a genuine human disorder. Nor do you need to approve of Dostoyevsky's political outlook, which was a mystical version of nationalism deeply stained with xenophobia.

What Dostoyevsky diagnosed - and at times suffered from himself - was the tendency to think of ideas as being somehow more real than actual human beings. It would be a mistake to imagine that we haven't also fallen into this sort of delusional thinking. The wars the West has fought in the Middle East over the past decade and more are often attacked as being little more than attempts to seize natural resources, but I'm sure this isn't the whole story. A type of moral fantasy has been just as important in explaining the West's repeated interventions and their recurring failure.

Dostoyevsky's other major novels

Image caption John Simm as Raskolnikov in a BBC adaptation of Crime And Punishment

Crime and Punishment (1866): The story of Raskolnikov, a young student in 19th Century St Petersburg, who is consumed with guilt after he kills a moneylender

(1866): The story of Raskolnikov, a young student in 19th Century St Petersburg, who is consumed with guilt after he kills a moneylender The Idiot (1868): The tale of Prince Myshkin - the "idiot" of the title - whose naive and trusting nature precipitates disaster for the people around him

(1868): The tale of Prince Myshkin - the "idiot" of the title - whose naive and trusting nature precipitates disaster for the people around him The Brothers Karamazov (1880) - Philosophical novel about four brothers and their dissolute landowner father, whose murder raises questions about God, free will and morality

We've come to imagine that ideas like "democracy", "human rights and "freedom" have a power of their own, which can transform the lives of anyone who is exposed to them. We've launched projects of regime change, which aim to realise these ideas by toppling tyrants. But exporting revolution in this fashion can have the effect of fracturing the state, as has happened in Libya, Syria and Iraq, leading to civil war, anarchy and new types of tyranny.

The result is the position we find ourselves in at the present time. Western policy is now driven by fear of forces and ideas that have sprung from the chaos that earlier Western intervention created. Sadly, this fear isn't groundless. The risk of these conflicts rebounding on us as Western citizens who have fought in them return home is all too real.

We like to think that liberal societies are immune to the dangerous power of ideas. But it's an illusion to think we don't have demons of our own. Possessed by grandiose conceptions of freedom, we've tried to change the systems of government of countries we don't begin to understand. Like the deluded revolutionaries of Dostoyevsky's novel, we've turned abstract notions into idols and sacrificed others and ourselves in the attempt to serve them.

More from John Gray on writers

Subscribe to the BBC News Magazine's email newsletter to get articles sent to your inbox.