When Iain Banks announced on his website on 3 April this year that he was "officially very poorly" and that he had asked his long-term partner Adele "to do me the honour of becoming my widow" it was a typically dark-humoured response to his sudden discovery that he had inoperable gallbladder cancer.
The author of such literary novels as The Wasp Factory, Complicity and Crow Road was known for his narrative complexity and the darkness of much of his fiction but also for those flashes of humour that laced everything he wrote – even murder scenes in The Wasp Factory, his controversial debut. And there was a lightness in his science fiction writing – as Iain M Banks – even as he was dealing with big ideas and themes.
Iain Banks was born in Dunfermline, Fife in February 1954, the only child of an officer in the admiralty and a former professional ice skater. His family moved with his father's postings, first to North Queensferry then Gourock, Inverclyde. He was educated at Gourock and Greenock High Schools.
He decided he wanted to be a writer at the age of 11 and wrote his first novel when he was 16. At the University of Stirling he studied English, philosophy and psychology. After his 1975 graduation he did technician jobs on an oil platform construction site and an IBM computer plant at Greenock. He settled in London, where he clerked for a Chancery Lane law firm. He met his first wife, Annie, there.
All the time he was writing. Nobody would publish the three science fiction novels he wrote during this period – at least not until he was successful and he had re-jigged them.
In 1984, when he was 30, he made his extraordinary publishing debut with The Wasp Factory. Rejected by six publishers, it was an immediate though controversial success (The Irish Times called it "a novel of unparalleled depravity"). It is narrated by a 16-year-old boy who is both a child-killer and a ritual torturer of animals. Part of Banks' achievement is to make us feel sympathy for this isolated boy, especially through a final twist that provides some kind of explanation for his behaviour. A 1997 poll placed the work in the top 100 novels of the 20th century.
Banks worked on a science fiction novel, Consider Phlebas, after completing Wasp Factory, but his next published novels were Walking On Glass (1985) and The Bridge (1986). Both had a tripartite structure and multiple narrators. Banks acknowledged The Bridge's debt to Alasdair Gray's Lanark (1981) and often said it was his favourite work.
Consider Phlebas came out in rewritten form in 1987. Regarded as a "space opera", it marked the first appearance of The Culture, a benign society run by liberally minded machines who are opposed by the religious humanoids, the Idirans. It also marked the first insertion of the middle initial M (for Menzies, which had been his intended middle name) into his name – a nomenclature he maintained for his subsequent science fiction output. His last novel in the Culture series was The Hydrogen Sonata in 2012. He often said that he loved science fiction for its freedom, for the fact that in writing it he could "go anywhere and do anything".
His Espedair Street, also published in 1987, about an ex-rock star, was adapted for radio 10 years later starring John Gordon Sinclair. Player of Games (1988) and Use of Weapons (1990) followed. In both he continued to play with the narrative form.
Banks moved back to Scotland in 1991, settling near his childhood home in North Queensferry, Fife. His elderly parents moved in next door and remained his neighbours for almost 10 years. His next novel, The Crow Road (1992), was a Scottish family saga, told through his usual narrative trickery. Complicity (1993) is the story of a serial killer and a journalist, told from both their perspectives. Both novels were later made into TV productions directed by Gavin Millar.
In 1993, aged 39, he was proclaimed one of Granta's Best Young British Novelists. In 1997 the University of Stirling awarded him an honorary doctorate. In the same year he published a political fable, A Song of Stone, set in an anonymous land where civilisation has crumbled.
His political views became more overt in such fiction as Dead Air (2002) and The Steep Approach to Garbadale (2007). Banks had always been interested in politics and increasingly made public pronouncements on a wide range of issues. He was publicly critical of Tony Blair over the Iraq War, campaigning for his impeachment in 2004. In 2010 he joined the cultural boycott of Israel, refusing permission for his novels to be sold there.
Always frank about his fondness for occasional recreational drugs and more regular drams of whisky, in 2003 he published Raw Spirit: In Search of the Perfect Dram, a travelogue distilling his pleasure in malt whisky and its history. He was also passionate about cars but in 2006 his awareness of green issues prompted him to sell his small fleet, which included two Porsches. In the same year his knowledge of malt whisky won him Celebrity Mastermind – screened on the same evening he captained a team of writers who won University Challenge.
In his long career he wrote 29 novels and declared himself proud of them all, even Canal Dreams (1989) which he described as "the runt of the litter'. In 2008 one newspaper put him 38th in a list of 50 greatest British writers since 1945.
He was 10,000 words from the end of his 29th novel, The Quarry, when he was given his cancer diagnosis. One of the main characters is dying of cancer. He joked in an interview with the BBC in May to be broadcast tomorrow: "I've really got to stop doing my research too late. This is really such a bad idea."
He was a self-proclaimed "evangelical atheist" and so regarded his diagnosis as "bad luck, basically." When he announced his terminal illness the response was a spontaneous surge of warmth and admiration, especially on Banksophilia, a website set up by a friend of his (Banks had long been a fan of the possibilities of the internet).
He married his partner, Adele Hartley, and they honeymooned in Venice, where some of his ashes will be scattered. A musician and composer, he spent the last weeks of his life composing rather than writing. He told the BBC: "I've had a brilliant life and I think I've been more lucky than unlucky, even including the news of the cancer."
Iain Banks, writer: born Dunfermline, Fife 16 February 1954; married 1992 Annie (divorced 2007), 2013 Adele Hartley; died 9 June 2013.