Yoenis Cespedes’ history with boars goes well beyond an episode in May that resulted in him fracturing his right ankle and eventually restructuring his Mets contract, according to a 2017 interview that reemerged following The Post’s exclusive report detailing the strange injury.

Cespedes suffered the ankle injury on his Port St. Lucie ranch after a boar was removed from a trap — it’s unclear if that was Cespedes’ doing — and either charged toward him or startled him, causing the oft-injured outfielder to step into a hole and hurt his ankle, The Post reported Friday.

That led the Mets and Cespedes, 34, to restructure his existing four-year, $110 million contract, which will now cost Cespedes a minimum of $15.7 million and cost him as much as almost $30 million. Cespedes’ deal runs until 2021.

“There are many wild pigs [on the ranch],” Cespedes told Vice in March 2017 “I don’t want them to eat my land.”

Cespedes added he once caught a 300-pound boar with one of his traps (boars tend to weigh 175-200 pounds, according to a study from Texas A&M).

In the same interview, Cespedes said he lures the boars with corn.

“Sometimes I trap them, sometimes I don’t,” he said.

Cespedes hasn’t played since May 2018 because of a wide range of injuries, including the fractured ankle suffered on his ranch.