A judge has ordered the body of surrealist master Salvador Dalí to be exhumed to obtain samples for a paternity suit, according to reports Monday.

The BBC reported that a Spanish woman, Pilar Abel, claims Dalí is her father after he had an affair with a maid in 1955. A judge ordered the body exhumed because there were no alternative ways — either biological remains or personal objects of the artist — to gather a sample to be used in a DNA test.

Abel, then 58, claimed in 2015 that her mother and Dalí met during the 1950s when her mother worked for a family that spent summers in Cadaqués, Spain, where the late artist once owned a home before he died in 1989. The couple “had a friendship that developed into clandestine love,” according to documents filed by Abel at a Madrid court.

Dalí was later buried in Figueres.

Abel, who was born in 1956, took a DNA test in 2007 after her mother’s repeated assertions that she was Dalí’s daughter, using hair and skin remnants she obtained from a “death mask” of the painter. But the results were inconclusive, The Guardian reports.

Abel then reached out to Dalí’s official biographer, Robert Descharnes, and they agreed that further DNA testing would be done in Paris. But Abel claimed she never received the results of the DNA test and filed a paternity suit in Madrid in 2015 to obtain the results or have another test conducted.

In 2008, Descharnes’ son, Nicolas, disputed Abel’s claim, saying he was told by the doctor who conducted the test in Paris that Abel had been told the test was negative.

“There is no relationship between this woman and Salvador Dalí,” Nicolas Descharnes told the Spanish agency Efe in 2008, according to The Guardian.

The Dalí Foundation is preparing to file an appeal to the decision in coming days, a spokesperson confirmed to The Post.