Disraeli's ministry only lasted a matter of months, and at the end of the year his Liberal rival, William Ewart Gladstone, was appointed prime minister.