The Wells Fargo Center crowd rose to cheer at the end of Tuesday’s first quarter, an acknowledgment of the 76ers’ small victory.

Those same spectators then leaped to their feet just before the third-quarter buzzer, when a tip-in by Andre Drummond put the Sixers back on top of the Milwaukee Bucks by two points.

Then, they chanted “DE-FENSE!” with 6 minutes, 21 seconds to play, after a bucket by Shake Milton had given the Sixers a one-point advantage.

“I don’t know if anything surprised me with these guys,” said coach Doc Rivers. “They just play hard. They try to figure it out.”

But the severely shorthanded Sixers, on the second night of a back-to-back set, could not sustain the celebration with the NBA champions in the building. The Bucks made enough plays down the stretch and got 31 points, 16 rebounds and four assists from megastar Giannis Antetokounmpo to top the hosts, 118-109.

Still, the Sixers (8-4) put together another inspired performance against one of the league’s elite. They built a 13-point first-half advantage, hung around in the third after the Bucks seized the lead, made a charge late in that period and had a one-point lead with less than five minutes to play before Milwaukee pulled away late.

Sixers stars Joel Embiid and Tobias Harris, plus Matisse Thybulle and Isaiah Joe, remained out due to health and safety protocols. Sharpshooting guard Seth Curry also missed Tuesday’s game with a foot contusion. Tuesday’s effort came one night after the Sixers clawed back from 19 down against the Knicks but could not get over the hump in a 103-96 defeat.

“Last night and tonight we had chances,” Rivers said. “It’s an opportunity to grow, an opportunity to get better. I mean, I’m not down about the loss. But you either do one or two things in a competition —you either win the game or you lose the game. Period. We gave ourselves a chance to win the game in both, and there’s something to be taken from that, so we do learn a lot. But we didn’t win the games, and that’s a fact.”

The Sixers have followed their surprising six-game winning streak with a two-game skid. They will aim to get back on the winning track Thursday against Toronto, before departing for a season-long six-game road trip beginning Saturday at Indiana.

Maxey’s outburst

With about four minutes left in the first quarter, Danny Green swung a pass to Tyrese Maxey in the right corner and said something to his teammate. Green reminded Maxey to take the open look and Maxey obliged, draining the three-pointer to give the Sixers a 26-20 lead.

“He’s on me every single game about shooting the ball,” Maxey said. “ ... I’m trying to listen and become more comfortable and do whatever it takes to help the team. That’s sometimes going take me shooting open shots, and it’s gonna open it up for other guys.”

That was part of a 17-point outburst in the first for Maxey, the highest scoring total in a quarter in his young career. And it ignited a 31-point effort, the second-highest of his career, including a go-ahead layup with less than six minutes to play.

“Tyrese was sensational tonight,” Rivers said. “[He] kept attacking.”

It was the latest excellent performance from the first-time starting point guard who turned 21 years old less than a week ago. He entered Tuesday with 31 assists against just five turnovers over his previous five games, despite playing such heavy minutes that Rivers barred him from the practice facility on Sunday.

A couple of minutes after that corner 3, he hit a tough floater. With less than a minute remaining in the period, Maxey knocked down another three-pointer to push the Sixers’ lead to 37-30. He received a rousing ovation when he went to the bench.

Maxey’s fingerprints were also all over the third quarter. His and-1 finish early in the period cut the Bucks’ lead to 68-63, before a transition bucket got the Sixers within 71-70 with less than eight minutes remaining in the frame. His off-the-dribble three-pointer reduced Milwaukee’s advantage to 84-80 at the 3:29 mark. Then, he found Drummond in transition for a game-tying dunk late in the quarter.

Maxey was also thrilled to match up against Bucks standout point guard Jrue Holiday, a player he has long modeled his game after because he is “extremely competitive defensively and extremely skilled offensively.”

“It was crazy going up against him,” Maxey said.

Patchwork lineup

After a 25-rebound performance Monday night, Drummond earned the honors of being the last Sixer introduced as part of the starting lineup. He anchored a patchwork group that also included Maxey, Shake Milton, Furkan Korkmaz and Paul Reed by grabbing another 20 boards to go along with 17 points and three assists.

Frontcourt-mate Paul Reed, meanwhile, drew the assignment of guarding two-time MVP Giannis Antetokounmpo. In the first half, Reed blocked the Greek Freak off the glass — and jawed a bit in the aftermath — which led to a Maxey finish at the other end. Maxey said that play made him feel “like a fan. I was in awe.”

But in the second half, Rivers said Reed too often played Antetokounmpo on the side, which “is like water. He just went through [Reed].” Chalk it up as another early-career learning experience for Reed, who two games ago guarded Chicago All-Star DeMar DeRozan in his first NBA start.

“You gotta play Giannis square, and make him go through your chest,” Rivers said. “If he gets you on the side, it’s over, and Giannis seized the moment.”

The unconventional starting lineup meant Green and Georges Niang were the Sixers’ primary reserves. Rivers said he brought Green off the bench in an effort to limit him to about 20 minutes coming off a hamstring injury, but he ended up playing 28.

Niang started scorching hot from beyond the arc, connecting on his first four three-pointers in the first half to help propel Philly’s lead to 45-35 early in the second quarter. He finished with 21 points on 5-of-8 from long point range, but fouled out in the final minute after struggling during his spurts of guarding Antetokoumpo.

Bassey’s minutes

Rivers said before the game that he planned to play 10 Sixers against the Bucks. He only ended up playing eight, with rookie big man Charles Bassey getting his first meaningful NBA regular-season action.

Bassey, whose on-court availability for the Sixers was delayed due to a summer contract dispute, finished with zero points on 0-for-1 shooting and one rebound in five minutes. His highlight moment came in the second quarter, when his block on Antetokounmpo led to a Milton three-pointer.

Rivers said he “just decided not to” play a longer rotation because “I thought our guys were all right. They were fresh enough.” An exception, Rivers said, was Korkmaz, who played 45 minutes and shot 2-of-18 from the floor (including 1-of-12 from beyond the arc).

Curry officially being ruled out shortly before game time was also a factor, Rivers said, “but that happens in NBA games. It just does. You get late scratches and you gotta adjust.”