Mayor de Blasio has argued that his administration is clean as can be, but a new analysis of ancestry records reveals his family tree has roots in the corrupt political legacy of Tammany Hall.

Hizzoner is related to Mayor Robert Anderson Van Wyck, who won City Hall in 1897, according to the genealogy company MyHeritage.

De Blasio and Van Wyck have ancestral roots that connect back to the English knight Sir Thomas Boteler and his wife Margaret, both of whom were born in the 1460s, MyHeritage found.

The ancient pair are Van Wyck’s 10-times great-grandparents and de Blasio’s 15-times great-grandparents, the company claims. The connection makes the two City Hall denizens 11th cousins, five times removed.

Perhaps best known for presiding over the city’s consolidation of the five boroughs in 1898 and breaking ground on the first subway tunnel, Van Wyck was also plagued by scandal.

The corrupt Tammany Hall political machine chose him to run for mayor. Once in office, his only term was tarnished by what was known as the “ice-trust scandal,” which centered on Van Wyck getting 5,000 shares of free stock from the American Ice Company while securing a monopoly for it to sell ice in the city.

Van Wyck was ultimately cleared by then-Gov. Theodore Roosevelt.

De Blasio also has had his share of corruption-probe woes — in connection with his fundraising. De Blasio was cleared, too — even though the Manhattan DA’s Office criticized him when he announced his findings.

De Blasio press secretary Eric Phillips shrugged off the family ties Sunday.

“It’s news to the mayor,” he said. “Regardless of whether or not it’s true, I doubt you’ll see the mayor adding bedrooms at Gracie Mansion or more place settings at family get-togethers.”