Amid the anarchy of the Bonzo Dog Doo-Dah Band, Neil Innes, who has died unexpectedly aged 75, was a creative force, calming influence and urbane spokesman for a merry group of student satirists whose early success in the 1960s predated the world of Monty Python.

Yet even Neil’s patience could be exhausted when working alongside Vivian Stanshall, the group’s singer, fellow composer and self-destructive comedic genius. When Vivian began reading aloud his epic saga Sir Henry at Rawlinson End one night and his speech slowed to a slurred crawl, Innes stormed off stage in a rage of frustration.

There would be rows and disputes between the multitude of Bonzo Dogs over the years of breakups, reunions and career moves. The music business often proved a songwriter’s legal minefield, but for Neil the Bonzos gave him his fondest memories.

A singer, pianist and guitarist, Neil wrote the Bonzos’ jaunty hit single I’m the Urban Spaceman, produced by Paul McCartney, which peaked at No 5 in the UK charts in 1968 and won the composer an Ivor Novello award. He also coined the phrase Cool Britannia, which became a mantra for the Labour party when Tony Blair was prime minister, much to Neil’s mild dismay. He thought its political use was decidedly uncool.

The Bonzo Dog Doo-Dah band performing on Top of the Pops in 1968. From left: Dennis Cowan, Vivian Stanshall, Neil Innes, Rodney Slater, ‘Legs’ Larry Smith and Roger Ruskin Spear. Photograph: Michael Putland/Getty Images

Surrounded by explosive Bonzo chums such as Stanshall, Rodney Slater, Roger Spear, Vernon Dudley Bohay-Nowell, “Legs” Larry Smith and Sam Spoons, Neil emerged as the most studious and musicianly of a motley crew that the Beatles and even hard rockers Cream took to their hearts, especially when he played the world’s most appalling guitar solo on the Elvis spoof Canyons of Your Mind. It was all done in the worst possible taste.

A twinkling, self-deprecating humour revealed itself when I first talked to him back stage at the Tiger’s Head pub in Catford, south London, one winter’s night in 1965. The Bonzos had just played one of their earliest shows and left the stage amid clouds of smoke from illegal pyrotechnics. Musically they sounded like a retro 20s dance band. “No, we’re not copying the Temperance Seven,” he insisted. “We are murdering them.”

It was a great quote for my first story on the band in Melody Maker. But later he denied having said it: his great achievement was to blend deep-rooted musicianship and wry humour with entertaining skill.

After the Bonzos came to an end, Neil started working with the Monty Python team, writing songs in 1973 for the film Monty Python and the Holy Grail (1975). A sketch on Eric Idle’s TV series Rutland Weekend Television in 1975 provided a platorm for Neil’s Beatles spoof, the Rutles, and it was followed on BBC2 by the Innes Book of Records (1979-81).

From 1973 onwards his musical director was John Altman, who said: “He really was a very talented guy. When you heard his songs for the Rutles, you’d think ‘This is as good as the Beatles.’ George Harrison became a huge fan and was always in the studio when we were recording.” He famously said he that he liked The Rutles better than he did the Beatles.”

The Rutles in 1978. From left: Neil Innes, Ricky Fataar, Eric Idle and John Halsey. Photograph: Michael Ochs Archives/Getty Images

Born in Danbury, Essex, Neil was the son of Edward Innes and his wife Rita (nee Hudson), and had a brother, Iain. His father was a warrant officer in the Royal Artillery, and the family moved to Bad Harzburg, Lower Saxony, as part of the British Army of the Rhine. He went to primary school there, and after the family’s return to Britain in 1955 attended Thorpe grammar school, Norwich, before enrolling at Goldsmiths College of Art, London, in 1962.

He studied piano from the age of seven until he decided to switch to the guitar at 14. But he had bought a very cheap model: “It was such a bad instrument it was more like playing an egg slicer. So I put music aside and became more interested in painting.”

On returning to music, he played tentatively with the newly formed Bonzo Dog Doo-Dah Band in the canteen at the Royal College of Art, London, in 1963. The band began playing London pubs with elaborate stage shows that led to record contracts and the studio albums Gorilla (1967) and The Doughnut in Granny’s Greenhouse (1968), and appearances on the TV series Do Not Adjust Your Set.

The Beatles connection was forged when the now professional band appeared in the film The Magical Mystery Tour (1967), for which Neil wrote the gangster themed Death Cab for Cutie.

Yet despite achieving cult status and pop success, the band broke up acrimoniously in 1970. Undaunted, Neil launched a productive solo career, releasing the album Lucky Planet and joining forces with the Monty Python team. In Idle’s song Always Look on the Bright Side of Life, from Monty Python’s Life of Brian (1979), Neil contributed the cheery whistling, and the Rutles had their own mockumentary film, All You Need Is Cash (1978).

In the 80s Neil diversified, contributing to children’s TV shows, adding voiceovers for the cartoon series The Raggy Dolls and composing music for the show and other children’s series, notably Puddle Lane, The Riddles and Tumbledown Farm.

Neil returned to the stage and embarked on tours of the UK, America, New Zealand and Japan, and in 2006 took part in a historic Bonzo Dog Band reunion concert at the Astoria, London. This was followed in 2008 by a Rutles 30th anniversary tour. In 2010 he unleashed A People’s Guide to World Domination tour and was still on the road and making personal appearances until his death.

In 1966 he married Yvonne Hilton. She survives him, along with their sons, Miles, Luke and Barney, and grandchildren, Max, Issy and Zac.

• Neil Innes, musician and songwriter, born 9 December 1944; died 29 December 2019