MILWAUKEE — Thanks to a change to their starting lineup and another pair of outstanding performances from Damian Lillard and Giannis Antetokounmpo, the Milwaukee Bucks ended a six-game losing streak with a 123-100 victory Thursday night over the Utah Jazz.

Milwaukee altered its starting group for the first time this season, inserting second-year wing Andre Jackson Jr. to replace Gary Trent Jr. Jackson, who turns 23 next week, had 7 points, 4 assists, 4 steals and 3 rebounds in 28 minutes.

“He brings energy,” Antetokounmpo said of Jackson’s presence in the starting lineup. “He plays his ass off, guards the best player. We play faster. He was incredible today. We definitely need that. We need that spark. We need to play with that energy.”

Jackson’s energy aided both Lillard, who finished with a game-high 34 points, and Antetokounmpo, who had 31. It marked the third time in the first eight games of the season both players have scored at least 30 points, the most by any duo in the NBA this season.

But despite the pair’s fast start, the Bucks have not been able to consistently translate their performance into wins, which is why Thursday’s game was so crucial.

“We needed it bad, desperately,” Lillard said. “It was important for us to not only get off that six-game losing streak, but to feel something good.”

Thursday began a stretch of five games in seven nights for the Bucks, who improved to 2-6. They play again Friday against the Knicks in New York before returning home to face the Boston Celtics on Sunday.

“Going into this next stretch of games, it was important for us to get back in the win column,” Lillard said. “Not just win a game, but do a lot of things we can have some carry-over with. We do a lot of the things we did tonight against any team with the pace we did it at and the energy we did it with, I think we’ll have success.”

Before entering the starting unit, Jackson had seen his minutes increase steadily; he played in only one minute of garbage time through the first two games to a season-high 24:55 on Monday against the Cleveland Cavaliers.

“We keep looking for that position just to be a good role player,” Bucks coach Doc Rivers said before Thursday’s game. “[We want Andre to] just be an athlete. Be quick to the ball. Defend, understand your role.”

Rivers did not commit to the lineup change long term but said he made the shift to help Trent snap out of his early-season skid. After signing a veteran minimum deal with Milwaukee this offseason, Trent has struggled in his first seven games, shooting 28% from the field and 23% on 3-pointers.

“I’m just trying to give him room to breathe,” Rivers said. “And get out of his little thing because I know he will.”

Trent played only eight minutes against the Jazz, scoring two points. Rivers said Trent was experiencing back spasms and did not play in the second half.

Antetokounmpo returned to Milwaukee’s lineup after sitting out a game because of a right adductor strain. He added 16 rebounds in the win and was expected to play Friday.

“It feels, it feels great,” Antetokounmpo said about ending the losing streak, Milwaukee’s longest since 2015. “Another one tomorrow. I think we all will try to remember how it feels when you lose, so we don’t go back there.

“To be able to set the tone, especially in the first and third quarter. Ball was moving. Guys were defending. We were able to play good basketball.”