Author Iain Banks has revealed he has gall bladder cancer and has just "several months" to live.
In a personal statement on his official website, the Wasp Factory writer said he asked his partner Adele to marry him and is now on a short honeymoon.
The 59-year-old said: "The bottom line now, I'm afraid, is that as a late-stage gall bladder cancer patient, I'm expected to live for 'several months' and it's extremely unlikely I'll live beyond a year. So it looks like my latest novel, The Quarry, will be my last."
He opened the statement by announcing: "I am officially very poorly" - and revealed he initially developed a sore back in late January but thought it was because he was "crouched over a keyboard all day".
The Scottish author said his GP spotted he had jaundice and tests revealed the "grisly truth" at the start of last month.
He said: "I have cancer. It started in my gall bladder, has infected both lobes of my liver and probably also my pancreas and some lymph nodes, plus one tumour is massed around a group of major blood vessels in the same volume, effectively ruling out any chance of surgery to remove the tumours either in the short or long term."
All planned public engagements have been cancelled and he said he intends to spend as much quality time left seeing friends and family.
Banks also said: "There is a possibility that it might be worth undergoing a course of chemotherapy to extend the amount of time available. However that is still something we're balancing the pros and cons of, and anyway it is out of the question until my jaundice has further and significantly reduced."
He also revealed his publishers are working to bring forward the publication of his new novel so he has a "better chance" of being around when it hits the shelves.
Thanking his doctor and medical staff and describing the standard of care as "deeply impressive", he said: "We're all just sorry the outcome hasn't been more cheerful."