Did the butler really do it?

I couldn’t find an answer to this when I did a search of Cecil’s columns or on the boards. If I just missed it, I would appreciate it if someone pointed it out.
My question: when did the butler first “do it?” You know, if a murder takes place in a wealthy estate the answer just might be “the butler did it.” Though, the truth is that I have read and seen more movies, books, and cartoons make fun of this literary convention than I have actually read and seen anything that uses it. So, is there a series of books that started the stereotype? Did the joke come from one particular author’s work? Who first used the joke?
Thanks in advance to anyone that can help.

I don’t know which book, etc. started it. I think it’s harder for Americans at the start of the 21st century to appreciate “The Butler Did It.” The point, of course, is that the butler was supposed to be an “invisible” person – he didnt count, socially. He wasnt supposed to contribute his views or have a personality. So when “The Butler Does It” it’s as if he villain came out of nowhere, and you’re supposed to be taken utterly by surprise. Even if the phrase hadn’t been a cliche, I don’t think it would work for most of us – for your average mystery-reader, who doesn’t live in upper or upper-middle-class circumstances, the butler is NEVER invisible. We’d be wondering about him from the start.

I only know of three cases in which the butler does it.
SPOILER ALERT! SPOILER ALERT!
One is the Disney film “The Aristocats”. The second is a virtually forgotten Dick van Dyke movie called “Fitzwilly” that came out circa 1970. Barbara elson (“Agent 99”) and John McGyver were in it, too. van Dyke played the butler “Fitzwilly”.

The last was a Broadway play by Anthony Shaeffer, the same guy who wrote “Sleuth”. He also wrote the screenplay to Alfred Hitchcock’s “Frenzy”, and I think he wrte the screenplay for the Agath Christie movie “Death on the Nile”. As a sort of follow-up to Sleuth he wrote a very complex stage play entitled “Whodunit?” with more twists and turns than Sleuth had. It wasn’t as much of a success, so it was never filmed. I saw it with Fred Gwynne as the detective. His last line was “This was the first case I’ve ever seen where the Butler Actually Did It!”

I seem to recall reading that the phrase came from some old melodramas, but it’s just a vague memory - will look around a bit.

I think the butler also did it in one of the endings of the movie “Clue”

My mom says that the cliche started with a number of obscure British mystery writers in the 1920s, although she couldn’t cite an example.