The Miami Marlins apologized Monday for a tweet that used the death of famed wildlife conservationist Steve Irwin to troll the Tampa Bay Rays.

“This was a regrettable exchange by our otherwise creative social media team,” the Marlins said in a statement. “Unfortunately, in this medium, sometimes we swing and miss, and this was definitely a miss.”

The tweet in question was posted after the Marlins lost to the Rays on Sunday and the official Twitter accounts for the two teams were engaged in a snarky back-and-forth. After the Marlins made a reference to the Rays’ exploration of possibly splitting games between Tampa Bay and Montreal, the Rays shot back with a reminder that they had just swept Miami in a two-game series.

The Marlins responded: “yOU’RE LITERALLY THE ANIMAL THAT KILLED STEVE IRWIN LOG OFF.”

Irwin was filming a documentary series in the waters along the Great Barrier Reef when he was killed in a stingray attack in 2006.

The 44-year-old Australian had become a popular figure on the television show “The Crocodile Hunter,” in which he displayed a boyish enthusiasm about wildlife and interacted at perilously close range with a wide assortment of animals.

Among those who took issue with the Irwin tweet was former Marlins president David Samson.

“Yes I was fired, but the person responsible for this tweet should be sitting right next to me and would be were I still there," Samson wrote on Twitter. “Let’s hope [Miami Marlins CEO Derek] Jeter is actually paying attention. Inexcusable, even by Twitter standards.”

Tampa Bay, which played its first season in 1998, was originally known as the Devil Rays before the team shortened its nickname in 2007. The devil ray is a cousin of the stingray.

On Monday, the Marlins apologized on Twitter.

“Like everyone who grew up watching him, we miss Steve. We’re so sorry to have made light of his passing," the team said on Twitter.

The team reportedly said through a spokesman that “the matter has been addressed internally.”

Irwin was survived by his wife, Terri Raines Irwin, and two children, Bindi and Robert. Both his son and daughter have become TV personalities who promote wildlife education and conservation.

Read more from The Post: