Playboy heir Cooper Hefner and "Harry Potter" actress Scarlett Byrne tied the knot in a simple courthouse ceremony on Monday.

The couple said "I do" at the Ventura County courthouse in the coastal city of Oxnard, California, four years after their engagement. Scarlett Byrne opted for an elegant white midi-length skirt and corset-style peplum top while Cooper Hefner went for a classic suit. The English actress later shared a picture of her standing alongside her new husband at the County Clerk's Office on Instagram.

"Cooper and I are excited to share that we legally married," wrote Byrne, who played "Slytherin" student Pansy Parkinson in the "Harry Potter" film adaptations. The actress who posed nude for Playboy magazine in 2017, said they are looking forward to hosting a larger ceremony to celebrate with their friends and family, reports Daily Mail.

"We are looking forward to planning our wedding in the coming months where we will celebrate further with our friends and family," the 29-year-old explained. The "Vampire Diaries" actress also changed her last name to Hefner on social media.

Addressing her husband Hefner, son of Playboy founder late Hugh Hefner, the actress wrote "I love you Cooper. I am proud to stand by your side, as your partner, your friend, and your wife. I cannot wait to continue building a life together. My heart is so full and I am so grateful for our love."

Hefner shared the same image to his account and announced: "Scarlett and I have made it officially legal and the two of us could not be happier. Cheers to a life full of love, happiness, adventure, and great purpose, Mrs. Hefner."

Hugh Hefner and Cooper
Playboy magazine founder Hugh Hefner (R) and son Cooper arrive at the premiere of the film "The Rum Diary" hosted by Film Independent at the Los Angeles County Museum of Art (LACMA) in Los Angeles October 13, 2011 REUTERS

"I love you dearly and very much look forward to planning our wedding celebrations in the months ahead. I love you, Scarlett," the 28-year-old added.

Hefner is one of four children of the Playboy founder and worked as the chief creative officer of Playboy Enterprises. He left the company in April this year to launch his own media brand, the Hefner Media Corporation, and an adult digital content platform.