I just want to mention the weird example of Hungary.
It was merged in Austro-Hungarian Empire, and got it's freedom after first world war. Shortly after it a republican revolution took over, Hungary got demilitarized and after a communist revolution ended the short lived democracy. The communists tried to take back the control of whole historical territory of Hungary. They failed, and the new govenor, Horthy restored Kingdom of Hungary but without anyone in king's or queen's position. This lasted until the end of WW2.
An another - maybe better - example is Central African Republic.
In 1960 it gained de-facto independece from France, and became republic. Shortly after independence, in 1965 Jean-Bédel Bokassa grabbed the power and in 1972 declared himself Emperor of Central Africa. He ruled Central African Empire for an another 9 years, when France made a coup d'etat against him.