Tributes have been paid to the author Iain Banks, 59, best known for his novels The Wasp Factory and The Crow Road, who has died just two months after announcing he had terminal cancer.

The Scottish writer had announced his illness with trademark dark humour on his website on 3 April, telling fans he was "officially Very Poorly" and had been diagnosed with late stage gall bladder cancer and was unlikely to live for more than a year. He had asked his partner, Adele Hartley, to do him the honour "of becoming my widow", he had added.

In his last update, on 20 May, he had posted that he was considering chemotherapy to prolong his life if doctors felt it was appropriate.

But his condition deteriorated rapidly on Wednesday. In an email to friends, his widow said that he had died peacefully and was in no pain. The couple had been hoping for a few more months together.

His friend and fellow writer, Ken MacLeod, told BBC News: "He was still in good spirits and concentrating on his plans and projects and expecting to have another few months. But his situation took a turn for the worse."

He added: "What Iain brought to his writing was himself. He brought a wonderful combination of the dark and the light side of life, and he explored them both without flinching.

"He left us a very significant body of work both in mainstream literature and in science fiction. And he left a large gap in the Scottish literary scene as well as that of the wider English-speaking world."

Neil Gaiman, also a close friend of Banks, tweeted: "Iain Banks is dead. I'm crying in an empty house. A good man and a friend for almost 30 years."

Banks, an honorary associate of the National Secular Society, will have a very small, humanist funeral. He had selected a dozen people to attend the short ceremony. An informal memorial gathering will be held at a later date.

Banks, who wrote science fiction under the name Iain M Banks, published The Wasp Factory, his first novel, in 1984. It was ranked as one of the best 100 books of the 20th century in a 1997 poll conducted by Waterstone's and Channel 4. In 2008, Banks was named one of the 50 greatest British writers since 1945 in a list compiled by the Times. In all he wrote more than two dozen novels.

In a statement, his publishers, Little, Brown, said: "Banks has been one of the country's best-loved novelists for both his mainstream and science fiction books since the publication of his first novel, The Wasp Factory.

"Just three weeks ago he was presented with finished copies of his last novel, The Quarry, and enjoyed celebration parties with old friends and fans across the publishing world.

"Iain Banks's ability to combine the most fertile of imaginations with his own highly distinctive brand of gothic humour made him unique. He is an irreplaceable part of the literary world." After announcing his illness in April, Banks asked his publishers to bring forward the release date of The Quarry so he could see it on the shelves.

Fellow authors paid tribute on Twitter. John O'Farrell said: "So sad to hear of death of brilliant and charming Iain Banks. The Wasp Factory was the first book I finished and then immediately read again."

Irvine Welsh wrote: "I'm off out to the pub to toast one of my all-time literary heroes with a malt." Mark Billingham said: "Knowing it was coming does not make it any less terrible. RIP the unique and irreplaceable Iain Banks."

Scotland's first minister Alex Salmond tweeted: "One of Scotland's literary greats who always approached life with extraordinary vitality."

Born in Dunfermline, Banks read English, philosophy and psychology at the University of Stirling before fulfilling his ambition, held since the age of 11, to become a writer. He was described as politically left of centre and was a supporter of Scottish independence.

In his last post on Banksophilia: Friends of Iain Banks, he thanked everyone for their messages of support. "It means a lot, almost more than I can say, and – whatever type or size of screen I read the comments on – I come away from the computer, laptop, iPad or phone with a happy smile on my face."

Ian Rankin told the BBC that Banks was "fascinating, curious and full of life".

"He didn't take things too seriously, and in a way I'm happy that he refused to take death too seriously – he could still joke about it," he said. "I think we all thought he would have a bit longer than he got.

"What made him a great writer was that he was childlike; he had a curiosity about the world. He was restless, he wanted to transmit that in his work, and he treated the cancer with a certain amount of levity, the same that made him a great writer.

"You never knew what you were going to get, every book was different."

The Quarry, which Banks was writing before his diagnosis, will be released on 20 June. It describes the final weeks of the life of a man in his 40s who has terminal cancer.