What a bonehead.

An art dealer was busted allegedly sneaking 12 ancient human skulls into the country — and the feds now want to get their hands on the spooky artifacts, new court documents reveal.

David Howard allegedly hid the painted domes — decorated with beads, elaborated engravings and paint in the style of “trophy heads” from Indonesia and Papua New Guinea — inside nine wooden masks when they were shipped from Indonesia in 2014, according to a forfeiture complaint filed Wednesday.

Howard, who sells historic art online, claimed the package just contained “handicrafts” worth $535, according to the complaint filed in the Eastern District of New York.

When he went to meet with customs officers at a cargo office in California, he told them he was a “practically retired” landlord and the masks were to entertain his two small kids, the court papers claim.

But when inspectors took a closer look at the wares, they found the dozen craniums — valued at more than $38,000 — hidden inside.

When confronted, Howard conceded they were, indeed, human skulls and he hadn’t declared them because he’d had trouble trying to import similar products in the past, the docs say.

The federal government is now seeking official ownership of the skulls, which have been collecting dust at a Department of Homeland Security center in Queens.

The East Coast storage site is ideal because it’s closer to the the Indonesian consulate in New York and the Smithsonian in Washington, DC, a law enforcement source said.

Howard, 68, of San Francisco told The Post a customs agent was actually to blame for marking the skulls as “masks” and undervaluing them.

“I think I’m being scapegoated because they can’t control this trade and they see me as the guy that’s going to take the fall,” he said. “They want to make an example out of me.”

But the feds claim it’s not the first time he has fudged the truth about human heads, the court papers say.

In May 2009, he allegedly carried six decorated skulls on a flight from Japan to San Francisco.

An official with the Centers for Disease Control seized them, and requested certification to ensure they didn’t contain infectious material, according to the court papers.

During the questioning, he allegedly claimed they were “tribal artifacts” for “research purposes and book text illustration.”

But two years later, an undercover agent contacted Howard to buy the pieces — which were listed as for sale on his Web site — and he said they could be purchased for $3,200 to $16,500 each, the court papers say.