Dad’s Army writer and co-creator David Croft has died in his sleep, aged 89, leaving fans of all ages paying their respects to one of the greatest ever sitcom producers.

His family issued a statement saying that the TV veteran had passed away peacefully at home home in Portugal.

Awarded am OBE in 1978, Croft had the magic touch in screenwriting; penning and producing hits that included Ain't Half Hot Mum, You Rang M'Lord and Hi-de-Hi!

In a long and fruitful partnership with Jimmy Perry, Croft also created Dad’s Army, first aired in 1968 and still much loved today. The show was inspired by his own time serving as a major during World War II, in North Africa, India and Singapore.

Later, Croft was to create Are You Being Served? and 'Allo 'Allo with Jeremy Lloyd.

“He was a truly great man, who will be missed by all who had the great fortune of knowing and loving him," Croft’s family said in a statement.

"We know that he would have been proud that you had all been watching.”

Testament to the generation-spanning appeal of Dad’s Army can be seen on Twitter.

“RIP David Croft. Another bit of my childhood gone. But he leaves a behind some of the greatest sitcoms ever written,” tweeted Allan Andrews.

While Olive Pits wrote: “Oh, poor David Croft! Thank you for making my media A-Level extra enjoyable.”

Celebrities have been quick to pay their respects.

“David Croft has sadly passed away. What an incredible career he had. May he rest in peace,” said James Corden.

Melvyn Hayes, who starred in It Ain't Half Hot Mum, said: "The man was a genius. I was very privileged to have the opportunity to work with him. We worked together for quite a while before It Ain't Half Hot Mum.

"He based his writing on truth. He had a great innings and was very successful at everything he touched. Dad's Army is always on, somewhere in the world."

Here are some classic Dad's Army moments