Kim Kardashian just purchased a piece of history.

The "Keeping Up with the Kardashians" star, 40, won a coveted item worn by Janet Jackson in the "Doesn’t Really Matter" songstress’ 1993 music video for her record, "If" and Kardashian honored Jackson in a social media post for her 55th birthday.

"Happy birthday queen!" Kardashian wrote on her Instagram Story, according to People magazine, alongside a clip of Jackson wearing the ensemble. "For @janetjackson's bday bc I'm such a fan I can't believe I won this on juliens_auctions." 

Jackson responded to Kardashian in her own Instagram Story. "Thank u so much @kimkardashian! I hope 'IF' gives u as much pleasure as it did me," she wrote along with three kissing face emojis.

KIM KARDASHIAN GIVES DAUGHTER A $65K MICHAEL JACKSON JACKET FOR CHRISTMAS

According to the outlet, the three-day auction, titled, "Iconic Treasures From the Legendary Career and Life of Janet Jackson," was held to commemorate Jackson's birthday and two days before Kardashian posted the birthday tribute to the "Poetic Justice" actress.

The auction house had announced that the outfit – a custom-made cropped suede top with artificial bone detailing and a pair of black lace-up front pants — had sold for $25,000.

OLIVIA NEWTON-JOHN SAYS KELLY PRESTON’S DEATH ‘KEEPS ME GOING’ IN FIGHT AGAINST CANCER

In 2019, Kardashian also shared that she and then-husband Kanye West had purchased their daughter North a custom velvet jacket worn by Michael Jackson to Elizabeth Taylor’s 65th birthday party in 1997 and again at a screening of his movie "Ghosts."

Kardashian made the winning bid of $65,625, although the piece was only expected to fetch between $10,000 and $20,000, Julien’s said ahead of the auction.

"North is a really big Michael Jackson fan and we knew she would love this," the SKIMS founder said on her Instagram story at the time. "We won this on an auction for Northie for Christmas."

OLIVIA NEWTON-JOHN’S ICONIC ‘GREASE’ OUTFIT SELLS FOR $405G AT AUCTION

The black velvet jacket that was once owned by the King of Pop features a stone and pearl vine motif on one shoulder and three suspending rhinestone tassels across the chest. During the guided tour, Kardashian shared that the jacket has been tacked along the sleeves and waist so her 6-year-old daughter can fit it comfortably.

A portion of the proceeds from the latest Jackson heirloom will go towards Compassion International, a non-profit organization that provides humanitarian aid to children in need.  

CLICK HERE TO SIGN UP FOR OUR ENTERTAINMENT NEWSLETTER

"Can't believe this will be the last time I'll see some of these items, but it's for a good cause," Jackson recently said in a video announcing the sale. 

Fox Business' Cortney Moore contributed to this report.