BOSTON — Isaiah Thomas took off for the basket, just what the Boston Celtics needed with the game tightening up.

Thomas had consecutive key baskets and finished with 21 points, Evan Turner scored 19 and the Celtics won their fourth straight with a 100-91 victory over the New York Knicks on Sunday night.

With the Celtics clinging to a 90-85 lead and just over three minutes to play, Thomas came up with his timely driving baskets to push the lead back to nine. The first came on a drive down the lane and the second he easily beat everyone down the floor after grabbing the rebound.

“Super quick because he loves to score,” Turner said of Thomas. “He was tenacious and I think he knew we needed a couple of plays and stepped up.”

The Celtics had opened an 88-78 lead on Turner’s driving basket with 6:11 to play before New York made its charge. Thomas’ plays made sure the Celtics were never in danger of losing.

“We need him to be a good playmaker for us,” Boston Coach Brad Stevens said. “I think he would tell you it wasn’t his best day, but again, he did make the biggest plays to push the lead from five to nine. That gives you a little bit of a comfort level.”

Thomas added eight rebounds and six assists.

Jae Crowder defended Knicks star Carmelo Anthony tough and scored 18 points, and Kelly Olynyk added 11 points and nine rebounds for Boston.

“He’s tough. I mean, he’s tough,” Anthony said of the 5-foot-9 Thomas. “Little guy with big heart out there. Hard to stay in front of him, got to stay in front of him. Draws a lot of attention. If he don’t have it with the way that they space the court, when guys (are) making shots, it’s kind of tough to kind of stop him.”

Anthony led the Knicks with 29 points despite shooting just 11 of 26. Kristaps Porzingis had 16 points and 12 rebounds.

New York, which shot just 37.1 percent, lost its fourth straight. The Knicks committed 13 turnovers.

“Turnovers always swing the momentum, especially on the road,” New York Coach Derek Fisher said. “That’s where we really got ourselves in trouble.”

Boston pushed its 10-point halftime lead to 59-44 on Crowder’s 3-pointer from the left wing 4:11 into the third quarter. The Celtics led 77-65 after three quarters.

Thomas made a behind-the-back pass to Jonas Jerebko, who nailed a 3 from the right wing to cap an 18-6 run that gave Boston a 47-33 edge late in the first half.

The Celtics led 51-41 at halftime.