© University of Oxford A page of Tomlinson's diary.

An English farmer writing more than 200 years ago had more modern and liberal views on homosexuality than many governments do today, an entry in a newly discovered diary shows.

Matthew Tomlinson, a farmer from West Yorkshire in Northern England, wrote in January 1810 that homosexuality was innate and that punishing it by death was cruel.

Responding to reports in the media about a naval surgeon being executed for sodomy -- a typical punishment for homosexuality in the 19th century -- Tomlinson reasoned that penalizing people for something that had been their "nature from childhood" was unfair.

The find has upended historians' assumptions about historical attitudes to homosexuality, contradicting the view that it was unanimously seen as abnormal and dangerous at the time -- and could be considered a more modern attitude than those held by the 70 countries around the world that still criminalize homosexuality.

Tomlinson wrote: "It appears a paradox to me, how men, who are men, shou'd possess such a passion; and more particularly so, if it is their nature from childhood (as I am informed it is) -- If they feel such an inclination, and propensity, at that certain time of life when youth genders [i.e. develops] into manhood; it must then be considered as natural, otherwise, as a defect in nature ... it seems cruel to punish that defect with death."

He goes on to grapple with the question of why God would create people who are attracted to the same sex and then dictate that they should be penalized, writing: "It must seem strange indeed that God Almighty shou'd make a being, with such a nature; or such a defect in nature; and at the same time make a decree that if that being whome he had formed, shou'd at any time follow the dictates of that Nature with which he was formed he shou'd be punished with death."

European societies at the time were significantly more religious than today.

The death penalty was used on those found guilty of sodomy in England and Wales until around the middle of the 19th century, before it was replaced with a prison sentence in 1861.

In 1885, all homosexual acts were made illegal, until homosexuality was eventually decriminalized in 1967.

As many as 12 countries still penalize homosexuality with capital punishment, and it is criminalized by 70 nations, according to the LGBT monitoring group ILGA.

An 'extraordinary' discovery

The surprising passage in Tomlinson's diary was discovered accidentally by Eamonn O'Keeffe, a researcher at the University of Oxford, who had been looking into the role of British military musicians during the Napoleonic Wars.

"This exciting discovery complicates and enriches our understanding of Georgian attitudes towards sexuality, suggesting that the revolutionary conception of same-sex attraction as a natural human tendency, discernible from adolescence, was mooted within the social circles of an ordinary Yorkshire farmer," O'Keeffe said in a press release.

"While Tomlinson's writings reflect the opinions of only one man, his phrasing - 'as I am informed it is' - implies that his comments were informed by the views of others," he added.

Other figures from the era, including the philosopher Jeremy Bentham, also mooted relaxing the punishment of homosexuality -- but little evidence had previously suggested that such views were commonplace.

Several historians have lauded the finding. Princeton University professor Fara Dabhoiwala said in the press release that it "provides vivid proof that, even during times of severe persecution, historical attitudes to same-sex behaviour could be more sympathetic than is usually presumed."

"It is extraordinary to find an ordinary, casual observer in 1810 seriously considering the possibility that sexuality is innate and making arguments for decriminalisation," added Rictor Norton, an American expert on gay history.