Image copyright PA Image caption Jeremy Lloyd collected an OBE award for services to comedy in 2012

Jeremy Lloyd, co-creator of BBC comedies 'Allo 'Allo! and Are You Being Served?, has died aged 84.

Lloyd died in hospital after being admitted for pneumonia, his agent said.

He worked with fellow comedy writer David Croft on the popular comedy series set in a department store, which ran from 1972-85.

His agent Alexandra Cann said: "Jeremy was a great wit and always a mass of original ideas.

"He had a wonderfully original mind and will be greatly missed."

Media playback is unsupported on your device Media caption Jeremy Lloyd's most famous creations were Are You Being Served? and 'Allo 'Allo

Actress Vicki Michelle, who starred in 'Allo 'Allo! as sultry French waitress Yvette Carte-Blanche, said via Twitter that Lloyd was "such a wonderful talent, mentor and friend. A complete joy to work with."

Lloyd was married three times, including to the actress Joanna Lumley for a short period in 1970.

Lumley wrote about their brief union: "He was witty, tall and charming - we should have just had a raging affair."

Six months ago he married his third wife, Lizzy Moberly, who Lloyd described as "beautiful, clever and sent from heaven on a mission impossible".

Image caption Lloyd co-created hapless comedy characters Edith and Rene in 'Allo 'Allo

Image caption The shopfloor antics of Are You Being Served? proved a hit for 13 years

He was appointed an OBE in 2012 for services to comedy and said he was "astounded" to gain an honour for doing what he enjoyed.

The success of Are you Being Served? spawned two spin-offs - Grace and Favour and Come Back Mrs Noah - both of which he worked on with Croft, who died in 2011.

The series was based partly on his own experiences of working in a London department store as a suit salesman.

He recalled of his time there: "I was fired for selling soft drinks in a fitting room and smoking too much behind the counter."

Image copyright Rex Features Image caption Jeremy Lloyd was married to Joanna Lumley for a brief period in 1970

The partnership's other great success was 'Allo 'Allo!, set in Nazi-occupied France. It was a huge success with audiences and was screened on the BBC from 1982-92.

Lloyd's other work included writing the music and lyrics for children's character Captain Beaky, with a song performed by Keith Michell making the UK top five in 1980.

Earlier in his career, Essex-born Lloyd appeared in a number of film comedies including The Rag Trade, and he had roles in The Avengers during the late 1960s.

He also had success in the US, with regular slots on Rowan and Martin's Laugh-In where his upper crust accent was a hit with Stateside audiences. He also wrote material for the show.

Lloyd also appeared on the Billy Cotton Band Show where he first met his future comedy partner Croft.