In a move to preserve the historic Magic Castle in Hollywood, video game mogul Randy Pitchford is buying the famous home of the Academy of Magical Arts.

The purchase, which is expected to close by the end of the month, will ensure the prime property in the heart of the tourist district remains the academy’s clubhouse and performance venue, Pitchford said. The price has yet to be disclosed.

Pitchford is best known as the founder of Gearbox Entertainment Co., which developed the popular Borderlands franchise of video games. He is also a lifelong magician and member of the academy based at the Magic Castle, where he learned the tricks of the trade.

“Basically everything I know about entertainment started at the Magic Castle,” said Pitchford, whose magic specialty is sleight-of-hand. “I feel like I owe my career to the Magic Castle.”

The sale comes a little more than a year after the storied institution was shaken by allegations of bad behavior, detailed in a Los Angeles Times investigation. In interviews with The Times, 12 people — among them guests and former employees — accused Magic Castle management, staff, performers and academy members of abuses that included sexual assault, sexual harassment and discrimination on the basis of race or gender.

The academy’s board president at the time, Randy Sinnott Jr., responded with a statement: “The Academy of Magical Arts and its Board work to provide a safe and welcoming environment and experience ...

“All claims brought to the attention of the Board or management are treated seriously and professionally,” Sinnott said.

The Magic Castle, a familiar sight on Hollywood’s Franklin Avenue, is an Edwardian manor with French and Gothic elements built in 1908 by Rollin Lane, a Redlands financier and orange grower, and his wife, Katherine. By the 1960s, it had become a maze of small apartments.

Pitchford is purchasing the Magic Castle from the Glover family, which had owned the property since 1961 when Thomas O. Glover bought the home and land. That same year, Glover leased the building to William “Bill” Larsen Jr., Irene Larsen and Milt Larsen, all of whom began the Magic Castle.

Glover and Larsen, who was a television writer and magician, turned it into a clubhouse for magicians. It still serves as headquarters for the Academy of Magical Arts, a group of several thousand magicians and enthusiasts dedicated to the celebration and preservation of the performing art.

Visitors who secure an invitation from an academy member can dine, drink and watch magic acts at the castle. The invitation carries with it a strict dress code that notes: “When in doubt, err on the side of being overdressed.”

The academy, a nonprofit public benefit corporation, has become a lucrative enterprise: In 2019, it generated revenue of $21 million and net income of $1.39 million, according to its annual report.

The 2020 pandemic broke the spell, as the castle closed during widespread business lockdowns. Plans the academy had to someday buy the property from its landlord, the Glover family, began to fall apart.

The academy “was draining its nest egg precipitously,” said Pitchford, grandnephew of 20th century master magician Richard Valentine Pitchford, who was known as the Great Cardini. The venue is open again, but the academy’s dream of buying the property is out of reach for years at least.

Meanwhile, real estate developers were approaching the Glover family hoping to secure the three-acre site to build housing and perhaps a hotel.

The magicians’ tenancy in the castle was in doubt, even if the historic landmark remained in place.

Pitchford, who married wife Kristy on a stage in the castle, stepped in to buy the property. He declined to reveal the price before the sale is complete. Included in the deal is the Magic Castle Hotel, a modest inn on the site that draws tourists.

Pitchford also declined to talk about his broader plans for the property, which will be operated by Erika Larsen, daughter of founders Bill and Irene Larsen. The academy will remain a tenant.

“I expect there will be investment into all of the property,” Pitchford said. “There is opportunity there, with Erika at the helm.”

Co-seller West McDonough said she has mixed feelings about parting with the property because she grew up visiting the castle and seeing magic acts with her grandfather, Thomas Glover. “I got called on in all the shows. The Magic Castle was my community.”

It’s time to sell, though, said McDonough, who married magician Jonathan Pendragon, the “Grand Master of Illusion.”

“Like any family business that’s gone down through a few generations, we’re getting down to where it’s spread through a lot of people who have their own priorities and agendas,” she said.

McDonough supports Pitchford’s vision for the property and is ready to let it go, she said.

“I am at the point where I am completely delighted because I no longer have to stress out worrying about whether it’s safe and what the future holds.”

Founder Thomas Glover had a son, also named Thomas, who is another member of the family that also owned the nearby Yamashiro restaurant before selling it in 2016. He’s now ready to let go of the Magic Castle.

“We had gotten hundreds of offers over the years, but Randy is a very special person as far as the castle is concerned,” he said. “Randy has the means and the attitude to preserve its legacy.”

Statements of support for the sale were also offered by renowned magicians David Copperfield and Penn Jillette, who praised Pitchford.

“All of the magic community is applauding Randy and excited about the new era of the Magic Castle,” said Jillette, the taller half of Penn & Teller.

“And now maybe I can get in without a tie because I know Randy.”