BOSTON — Defense dominated as Boston went back-and-forth with Minnesota for three quarters.

The fourth belonged to the Celtics, who pulled away early in the final quarter and held off the Timberwolves 91-84 on Friday night.

“We just stuck with it and the defense came and gave us a victory,” said Marcus Smart, who led Boston with 18 points. “Tonight was one of those games where every last one of us from the starters to the guys coming in off the bench were ready.”

Smart scored 16 in the second half and fellow reserve Terry Rozier finished with 14 points for the Celtics, whose bench outscored Minnesota’s 42-20.

“We played pretty good defense tonight. That’s what pushed us over at the end,” said Rozier, who added nine rebounds. “Once we locked in on the defensive end, we were fine. Create our offense by creating defense.”

Kyrie Irving had 16 points, nine rebounds and eight assists, Aron Baynes had 11 points and 10 rebounds and Jaylen Brown also scored 11 for Boston, which has won five straight and 6 of 7.

Karl-Anthony Towns led the Timberwolves with 25 points and a career-high 23 rebounds. Jimmy Butler scored 14, Jamal Crawford had 13 points and Andrew Wiggins scored 10 for Minnesota, which lost back-to-back games for the first time since November.

“I think we did a pretty good job defensively making it hard on them. We just didn’t make the shots we needed to make,” Towns said. “We fought very hard offensively. It just was a funky night for us.”

Boston had a rough night shooting, going 38 for 94 (40.4 percent) and making just 6-of-36 3-pointers. Minnesota also struggled, shooting 36.8 percent from the field.

“They are a good team,” Minnesota Coach Tom Thibodeau said. “You’ve got to play 48 minutes against them to win. We didn’t do that. We had a little lull at the start of the fourth.”

The Timberwolves, coming off a 98-97 loss at Brooklyn on Wednesday, faded early in the fourth after leading by as many as seven in what had been a tight game. The lead changed 14 times before Boston went up for good in the final period.

Irving drove for a layup with one second left in the third, starting a 10-2 run that allowed the Celtics to start pulling away. Baynes scored Boston’s first four points of the final quarter, and Rozier banked in a shot and then added a 3-pointer with 8:02 left that gave the Celtics a 77-68 lead.

Boston continued its run, getting a dunk by Baynes followed by a steal by Smart that started a fast break and sent Smart to the line for two free throws that pushed the lead to 85-73 with 6:05 remaining.

Boston Coach Brad Stevens said Smart is a luxury to have coming off the bench for the Celtics. He scored 16 on Wednesday night as Boston beat Cleveland 102-88 in a rematch of the 2017 Eastern Conference finals, and then led Boston in scoring Friday when the Celtics needed a late push to pull away from Minnesota.

“Sometimes when we’re struggling, I think the ball is going to find energy. And Marcus Smart has energy,” Stevens said. “He’s playing at a good level. We need him to continue to do so. Obviously, he’s a really important part of our team.”