When and how did the British government shift from being run from the House of Lords to the House of Commons?

by Foghorneer

I was reading the wiki page for the 3rd Marquess of Salisbury and it said he was the last prime minister to head his administration from the House of Lords. It is my understanding that Salisbury was not elected prime minister as a MP, but through his seat in the Lords. When did the prime minister start being selected from the House of Commons? Were any laws passed preventing a peer from being prime minister thus forcing the PM to come from the commons?

Avellanoff

In line with the unwritten and naturally evolving nature of most of the UK's constitutional monarchy, there actually are no laws that require the PM to sit in the Commons vs. the Lords. Although government was indeed rather tightly held by the aristocracy for a very long time, there were already cases, such as the very famous PM William Pitt the Younger, of PMs serving from the Commons (though he was by all means a member of the aristocracy too, just not a sitting member of the Lords). Similarly, Benjamin Disraeli, who served shortly before Lord Salisbury, did so also from the Commons for a while until he was granted a peerage by Queen Victoria (and, in his case, was in fact truly a commoner and one of Jewish descent, at that), as did William Gladstone, who served 4 different terms in the same period.

The change did naturally come about, though, around the time of Lord Salisbury and the end of the 19th century. In part, this was part of a broader global trend of progressive politics. A big long-term push in this direction also came from the 1867 and 1884 laws that widely extended the right to vote to vast numbers of working-class men and helped make Westminster eventually become much more democratically accountable as a whole.

Ultimately, the single most important reason was that as the most serious and significant political debates began to occur in the House of Commons, it became more or less necessary for the PM to be familiar with and serve in that body. As a matter of trivia, though, your original assumption isn't 100% right in that Lord Salisbury was actually not the last sitting peer to serve as PM. Sir Alec Douglas-Home, who began his career in the Commons and then sat in the Lords as Earl of Home once he inherited his estate, was appointed PM in 1963. Four days later, however, he gave up his titles and stood for an upcoming by-election for a Commons seat, which he won and proceeded to serve as PM from the Commons. In the meantime, he technically remained the Prime Minister while not a member of Parliament at all.

What other country on this planet could even last 20 years with a non-existent constitution as bizarre as that? Go figure...