The Orlando Magic fired general manager Rob Hennigan on Thursday morning, ending his five-year run as the franchise’s top basketball executive, league sources told The Vertical.

Assistant general manager Matt Lloyd will take over as the interim GM, league sources said, and his candidacy will be considered for the permanent general manager job.

Assistant GM Scott Perry was dismissed too, league sources said.

Hennigan engineered the four-team Dwight Howard trade to the Los Angeles Lakers upon his hiring five years ago, starting the Magic on the path of a rebuild that never gained traction. After hoping to reach the playoffs this season, the Magic floundered to a 29-53 record. In his five years since joining the Magic from the Oklahoma City front office, the franchise went 132-278 – only Philadelphia had a worse five-year stretch in the NBA.

Two league executives with Orlando ties – Detroit assistant GM Pat Garrity and San Antonio assistant GM Brian Wright – are on a list of preliminary candidates to replace Hennigan, but the search is expected to be extensive, league sources said.

Lloyd will be a legitimate candidate in the process too. He is widely respected inside and outside the organization, and considered one of the league’s most dogged player-personnel officials. Lloyd joined Orlando from the Chicago Bulls front office, where he had been instrumental in the drafting of Jimmy Butler.

Hennigan’s tenure suffered a serious setback after his June draft-night trade for Serge Ibaka failed to yield positive results. Ibaka had no interest in re-signing with Orlando this summer as a free agent and had to be moved at the trade deadline to Toronto for Terrence Ross.

Hennigan had traded former No. 2 overall pick Victor Oladipo, Donatas Sabonis and Ersan Ilyasova for Ibaka.

Several other trades, including sending first-round draft pick Tobias Harris to the Detroit Pistons, and free-agent signings, including the acquisition of Bismack Biyombo, were unsuccessful in turning around the franchise.

Near the end of the season, Hennigan inadvertently took a photo of the Magic’s internal plans on a white board while snapping a photo of a player signing a contract. Once that photo was posted on social media – and the fallout from the information made public began to hit the franchise – Hennigan had to suffer one more indignity on the job.

Nevertheless, the Magic had already decided to dismiss Hennigan, league sources said, and the instance had no ultimate bearing on his future.

More from Yahoo Sports:

• Dan Wetzel: Heartbreaking scene at Hernandez double-murder trial

• MLB player drug tested after first career grand slam

• NBA Playoffs: Full schedule for every first-round matchup

• Cubs’ World Series rings have 108 diamonds, 1 goat