On February 19, 1913 Pedro Lascuráin had the shortest term of any head of state when he served as President of Mexico for 45 minutes.
Victoriano Huerta had enacted a coup d’etat against the progressive-minded Francisco Madero. Under the 1867 Constitution of Mexico, the vice-president, the attorney general, the foreign minister and then the interior minister stood next in line to the presidency.
Huerta not only ousted Madero, but also the vice president and the attorney general, leaving foreign minister Lascuráin to succeed as president. In order to give his presidency some semblance of legitimacy, Huerta forced Lascuráin to appoint him as interior minister and then resign.
The presidency thus passed to Huerta. Lascuráin was president for less than an hour; sources quote figures ranging from 15 to 56 minutes.
Summarized from Wikipedia.