John Sullivan, who wrote the British sitcom Only Fools and Horses, has died at the age of 64.
He had been in intensive care for six weeks at a hospital in Surrey, battling viral pneumonia, the BBC reports.
Only Fools and Horses, starring Sir David Jason and Nicholas Lyndhurst as south London brothers Del and Rodney Trotter forever trying to make a quick fortune, was regularly voted Britain's favourite sitcom.
The sitcom ran for 10 years between 1981 and 1991, with several Christmas specials in the years that followed.
Sir David Jason told the BBC he was devastated at the loss of his friend, whom he described as the UK's greatest comedy writer. Nicholas Lyndhurst said Sullivan was a shy and self-effacing man who had a huge passion for his work.
Sullivan also wrote Citizen Smith and Just Good Friends. His latest work was television series Rock & Chips.
BBC head of comedy Mark Freeland said Sullivan was "the Dickens of our generation".
"Everything he wrote was basically about his life and the absurdities he faced, and the great characters he met," he said.
The son of a plumber, he is survived by his wife, two sons, daughter and two grandchildren.