Records showing the Prime Minister is a distant cousin of pub landlord comic Al Murray have turned up after millions of files detailing Britain's history in India were put online.

Around 2.5 million files from the India Office, dating from 1698 to 1947 and including wills and wedding certificates, are available.

They include files about John Talbot Shakespear, a senior civil servant in the East India Company, and David Cameron's great-great-great-great-grandfather.

He was also the uncle of Vanity Fair author William Makepeace Thackeray, who is Murray's great-great-great-grandfather - making the pair distant cousins.

Murray also has Scottish lineage - he is the great-great-great-great-great grandson of the 3rd Duke of Atholl, and his grandfather, Sir Ralph Murray, a diplomat, was of Scottish nobility.

The records include baptism forms for some of his children, an inventory of his possessions and his will, which puts his fortune at around £57 million in today's money.

The files also include baptism records of writers Rudyard Kipling and George Orwell, who were born in what was then British India.

They were previously available only in their original form or on microfilm at the British Library, but have now been put online at findmypast.co.uk.

Debra Chatfield from findmypast said: "The period covered by these records was absolutely fascinating.

"The 2.5 million records cover every aspect of life."