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, have been made 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.
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 both born in what was then British India.
They were previously available only in their original form or on microfilm at the British Library in north London, but have now been put online at findmypast.co.uk.
Debra Chatfield from findmypast said: " The period covered by these records was absolutely fascinating and includes some of the most important events in the history of the British Empire.
"The 2.5 million records cover every aspect of life, and provide snapshots of those at the top, middle and bottom of society.
"These vividly detailed records will help to unlock family mysteries and overcome dead ends in research, as family history enthusiasts can now go beyond the boundaries of UK family history and look further afield than ever before.
"The British in India collection really is a goldmine of enthralling lives and stories just waiting to be explored."