Iain Banks, the best-selling author, has died weeks after announcing he had been diagnosed with terminal cancer.

Banks, who lived in North Queensferry, had been considering a course of chemotherapy for his gall bladder cancer.

Banks, 59, had just finished putting the finishing touches to his new book The Quarry, which is due to be published on June 20.

The author counted The Crow Road, The Wasp Factory and several acclaimed science-fiction novels among his vast body of work.

He revealed in April that he was dying and asked his then girlfriend, Adele Hartley, to 'do me the honour of becoming my widow'.

Banks, who lived in North Queensferry, had been considering a course of chemotherapy for his gall bladder cancer.

Banks, 59, had just finished putting the finishing touches to his new book The Quarry, which is due to be published on June 20.

The author counted The Crow Road, The Wasp Factory and several acclaimed science-fiction novels among his vast body of work.

He revealed in April that he was dying and asked his then girlfriend, Adele Hartley, to 'do me the honour of becoming my widow'.

Banks, who lived in North Queensferry, had been considering a course of chemotherapy for his gall bladder cancer.

Banks, 59, had just finished putting the finishing touches to his new book The Quarry, which is due to be published on June 20.

The author counted The Crow Road, The Wasp Factory and several acclaimed science-fiction novels among his vast body of work.

He revealed in April that he was dying and asked his then girlfriend, Adele Hartley, to 'do me the honour of becoming my widow'.

The couple subsequently married and 'enjoyed life to the max' on honeymoon in Italy.

He was born in Dunfermline and brought up initially in North Queensferry before the family moved west. Banks was subsequently educated at Greenock High School, where he became a lifelong Morton FC supporter.

He went to Stirling University, where he studied English, philosophy and psychology. After university he took a series of jobs to allow him time to write. It was during one placement, as a costing clerk for a law firm in Chancery Lane in London, that he met his first wife, Annie, whom he married in 1992.

Banks published his first novel, The Wasp Factory, when he was 30. A disturbing novel about a youngster's mental disorder and trauma, it was a major hit. By the time of his death he had written 27 novels to his name.

His novel, The Quarry, is published next week. The success of The Wasp Factory was sealed with the following few novels, notably The Bridge, The Crow Road, and Complicity, about the Scottish media. Banks also embarked on a parallel career, writing science fiction under the name Iain M Banks, using the initial of his unofficial middle name of Menzies, which his father had forgotten to include on his birth certificate.

His fiction of both sorts won various prizes, including the Kurd-Laßwitz- Preis Award for Foreign Novel for The Wasp Factory, and the Premio Italia Science Fiction Award in the Best International Novel category for Inversions.

Banks's later mainstream novels, among them The Steep Approach to Garbadale, and Stonemouth, were more mellow than his harsher earlier novels, but never less than enjoyable. Outspokenly political, he refused an OBE, and his socialist principles are apparent in all his fiction - every bit as much in his fantastical world, The Culture, as in his earth-bound novels.

In 2004, he joined a petition calling for Prime Minister Tony Blair to be impeached for invading Iraq. In protest against the Iraq War, he tore up his passport and posted it to No 10 Downing Street. He kept to his promise of not renewing it until Blair was out of office, by which time, having become more environmentally conscious, he promised only to fly in emergencies.

After a 25-year marriage, Banks and his wife divorced. Following the public announcement of his terminal illness he married his partner, Adele, a novelist and horror film festival director.