Scottish sci-fi writer Iain M. Banks shocked fans on Wednesday by revealing he's been diagnosed with cancer and told he has just months to live.

The Hugo Award-winning Banks, 59, released a personal statement pierced with black humour on his website.

"I am officially very poorly," he began, adding that his latest novel The Quarry — which is now being fast-tracked for publication this year — "will be my last book."

Banks said he is weighing whether to pursue chemotherapy for his late-stage gall bladder cancer, which was confirmed in March after he initially began feeling ill in late January. He noted that it is "extremely unlikely" he would live more than a year.

"As a result, I've withdrawn from all planned public engagements and I've asked my partner Adele if she will do me the honour of becoming my widow," he wrote. "Sorry, but we find ghoulish humour helps."

Banks first gained fame for his well-received fiction before also adding science fiction to his oeuvre. His best known works include The Wasp Factory and The Crow Road.

The news has drawn an outpouring of support from friends and writing colleagues such as William Gibson, Irvine Welsh and Ian Rankin. A Friends of Iain Banks website has already garnered dozens of messages from his fans.

"Everyone who has ever come into contact with Iain shares our shock and sadness. Iain is a man whose vibrancy, energy and creativity seemed so unstoppable," said Ursula Mackenzie, chief executive of Little, Brown Book Group, which has published all of Banks' work.