MILWAUKEE (AP) — For only the second time this season, NBA leading scorer Giannis Antetokounmpo did not have the most points in a game for the Milwaukee Bucks.

Khris Middleton knew why after he finished with a team-high 27 points and eight assists in a 99-95 victory over the Detroit Pistons on Wednesday night.

“I’m just playing hard,” Middleton said. “That’s what I’ve noticed over the first couple of games. I don’t think I was playing hard enough. I’ve talked to some coaches, teammates, KG (Kevin Garnett) also came in, and the common thing that most of the guys were saying was I just need to play harder. And I think it was true. But now I feel like I’m just playing hard and not worrying about everything else and it’s working out.”

Antetokounmpo added 21 points in Milwaukee’s fourth straight victory, and the Bucks blocked 16 shots — two shy of the team record set in 1980 at Detroit.

“That’s the game right there, absolutely,” Pistons coach Stan Van Gundy said. “That’s 16 opportunities you don’t even get the ball up on the rim. When you look at the stat sheet, it’s really hard to figure out how the game was close. … It was a frustrating night. We really didn’t do anything well. I couldn’t find any offense to run to help us.”

Recently acquired Eric Bledsoe had 12 points, all in the second half, to help the Bucks halt Detroit’s five-game winning streak.

The Pistons were led by Avery Bradley’s season-high 28 points. Detroit, which shot just 35.3 percent, also got 13 points and 17 rebounds from Andre Drummond.

Bledsoe, who missed his first six shots, drilled one from the right wing for a 95-93 lead with 42 seconds to go.

“He had a turnover earlier on a bounce pass to Giannis,” Milwaukee coach Jason Kidd said. “He felt that everybody was going to run to Giannis on the same play and that he could get that shot. It just shows his maturity and his IQ. Playing for the moment, that was a big shot that helped us win.”

Bradley turned the ball over in the right corner after he was double-teamed, and Milwaukee made it 97-93 thanks to two free throws from Bledsoe with 16 seconds remaining.

Bradley’s basket pulled Detroit to 97-95, but the Bucks regained their four-point advantage on two free throws by Tony Snell with 10 seconds left.

Detroit called timeout, only to see Anthony Tolliver commit another turnover on the inbounds play in front of Milwaukee’s bench.

Pistons forward Stanley Johnson returned after missing the previous three games with a right hip flexor strain but had just two points on two shots in 18 minutes. … Detroit allowed only four points in the first 7:16 of the second quarter.

Bucks point guard Matthew Dellavedova missed his first game of the season because of left knee tendinitis, and forward Mirza Teletovic has not played in the last four games due to a sore left knee.

In the second quarter, Thon Maker swatted away Eric Moreland’s shot. Eight seconds later, Antetokounmpo sent Ish Smith’s shot into the first row of sideline seats. Smith thought it was goaltending and received a technical foul for complaining.

Before the game, Van Gundy was asked why his team seems to get off to slow starts. Detroit scored the first eight points against Milwaukee, but the Bucks responded with a 20-6 run.

“Right now, it hasn’t developed into a major problem and one that we can’t overcome,” Van Gundy said. “I’m not giving it undue attention, but it’s certainly been true. We haven’t jumped on anybody.”

The Pistons visit the Indiana Pacers on Friday after beating them 114-97 last Wednesday.

Milwaukee plays at the Dallas Mavericks on Friday. The Bucks has lost eight of its last nine games against the Mavericks.