My friend Liam Smith, who has died aged 91, was a historian who powerfully revised accounts of the French second empire (1852-70) and its emperor, Napoleon III, a nephew of Napoleon Bonaparte. A “black legend” of Napoleon III in both Britain and France held that he was a Machiavellian adventurer who seized power by a military coup, ruled despotically and led France into a terrible defeat in 1870. But Liam’s work argued that, on the contrary, he secured democracy in France, introduced liberal reforms and restored the greatness of France as a thoroughly modern predecessor of the Fifth Republic.

He published studies of Napoleon III in English in 1973 and a completely new version for Hachette in 1983, which he wrote in French. This was followed by a French biography of the Empress Eugénie in 1989, which won the Prix Napoléon, and a final study of the Bonaparte family in 2005.

Liam was born in Coleraine in Northern Ireland, the son of Herbert, a solicitor, who lost the family fortune, and his wife, Jean (nee McSheffrey). After Queen’s University, Belfast, Liam served as a radio operator in the Royal Navy at the end of the second world war and then trained to become a Dominican priest before cutting that avenue short and opting for an academic career. Supervised at King’s College London by Charles Boxer, the historian of Portugal, he did his initial research on Anglo-Portuguese history in the 19th century, but then switched to the history of the French second empire.

Something of an outsider, Liam was not only a Northern Ireland Catholic but a gay man at a time when it was illegal to live out his sexuality. He was fluent in languages that gave him another identity – Portuguese and Italian, but above all French.

His first academic post was at the University of Singapore, where he spent three years before returning to the UK and teaching at Henry Thornton grammar school in Clapham, south London. He then took up a lectureship in history at Goldsmiths, University of London, in 1962, a post he held, apart from a short spell at the École Pratique des Hautes Études in Paris (1979-80), until his retirement in 1985, by which time he was head of the history department.

Outside work, Liam gave much time to helping with the preservation of Saint Michael’s Abbey in Farnborough, Hampshire, which was founded by Eugénie as a resting place for her husband and son, the Prince Imperial, and entrusted to Benedictine monks. He was also an informal adviser to the Bonaparte family, and was in regular contact with Alix, Princesse Napoléon, wife of the long-time pretender to the French throne, Louis, Prince Napoléon. In France Liam was made officier dans l’Ordre des Arts et des Lettres in 2001.

He was a second father to many, myself included.