PHILADELPHIA (AP) — Doc Rivers gave a pep talk to Jamahl Mosley shortly after the Orlando Magic hired the rookie head coach in July. The 76ers coach's advice was simple:

“Just trust the process of things,” Mosley said.

Trust the process is still a triggering expression in Philadelphia, where the slogan for the franchise’s controversial rebuild method lingers to this day.

The Magic rekindled some of the earliest days of the plan with grit in a fiery second half that pushed the four-win team to the brink of an upset. Much like those early Sixers, the fight fell short.

Seth Curry scored 24 points, Tobias Harris had 17 and the Philadelphia 76ers needed free throws in the final minute to beat the Magic 101-96 on Monday night.

“We gave ourselves a chance because we sat down and guarded,” Mosley said after Orlando's seventh straight loss.

The Sixers shot 39% in the third quarter as they coughed up a 16-point lead and the Philly crowd booed them off the court. Mo Bamba’s dunk with 57 seconds left tied it 93-all.

The Sixers just hung on from the line. Ty Maxey made two for the lead, Joel Embiid hit 3 of 4 and Maxey added two more to help the Sixers avoid an embarrassing defeat. Embiid scored 16 points on 4-for-16 shooting.

Franz Wagner led the Magic with 27 points and Jalen Suggs had 17 before he left late in the fourth with a broken right thumb. He will miss “an extended period of time."

Last season’s top regular-season team in the East, the Sixers were hit with injury and illness this season that left them sputtering along at .500 most of this year. Embiid missed nine games because of COVID-19 — it him so bad, he said he had “headaches worse than migraines” — and Harris and Danny Green were among the other Sixers out for games because of league protocols.

Throw in the season-long absence of All-Star Ben Simmons following his trade demand, and the Sixers have been out of sync in Rivers’ second year on the bench.

Consider, the opening night lineup of Embiid-Harris-Green-Curry-Maxey started for only the seventh time this season (5-2).

“Now that everybody’s back, we got to figure out how to get back to playing dominant basketball,” Curry said.

For a while, the combo worked.

The Magic missed their first five 3s and the Sixers raced to a 31-19 lead.

But this was no blowout. And it was more proof that backed Rivers’ belief the starting lineup needed more games together to get its groove back.

“This team is going to be really good. I just feel it,” he said. “It’ll take a little bit, but we’ll be fine.”

The Magic about handed Philly its worst loss of the season.

Embiid still look fatigued in the second half and the Magic rallied their way into the lead. The Magic took the lead 64-62 on Suggs’ pick off of Embiid’s lazy pass and a fastbreak dunk that ignited boos from the home crowd. Suggs swung from the rim and then pointed toward the sky as he hustled back on defense. Wagner let out a primal yell on another dunk off a turnover that kept Orlando’s lead at three.

Knocking the Sixers on the ropes is all part of the journey for the Magic.

“They kind of stunned us a little bit,” Harris said. “We missed a couple of shots that could have fell, then we passed up a couple of ones. That's kind of the formula to allow a team to get confident.”

Embiid and Curry hit consecutive 3s late in the third to send the Sixers to an 81-78 lead at the end of the quarter. Curry hit a 3 that made it 94-89 late in the fourth, yet the Sixers still couldn’t completely hold off Orlando.

TIP-INS

Magic: Former 76ers guards Michael Carter-Williams, the 2013-14 rookie of the year, and Markelle Fultz, the No. 1 pick of the 2017 draft, both remained sidelined with injuries. Mosley said there is no timeline for the players, each once considered key cornerstones of the Sixers’ rebuild, to return to the lineup.

76ers: C Andre Drummond had his fourth game this season with at least 10 rebounds off the bench.

UP NEXT

Magic: Host Denver on Wednesday.

Sixers: Head out on a four-game trip and play Wednesday at Boston. The Sixers play in Atlanta and twice in Charlotte to end a stretch of 10 of 12 games on the road.

___

More AP NBA: https://apnews.com/hub/NBA and https://twitter.com/AP_Sports