SACRAMENTO, Calif. -- In a season when wins have been rare, the Sacramento Kings were not about to quibble that their latest one was not particularly pretty.

"Defensively, they beat us on the boards," Kings center DeMarcus Cousins said after a 105-98 win over the Boston Celtics on Saturday night at Sleep Train Arena.

"We had a lot of turnovers. But through it all, we stayed poised, and we were able to pull it out, and that's the important thing."

Kings forward Rudy Gay might have shown the most, saving his best for the fourth quarter and capping a 22-point night with a driving layup that put the Celtics away for good after Boston erased a 16-point lead and kept it a nip-and-tuck affair in the final six minutes.

Point guard Isaiah Thomas finished with 17 points and tied a career-best with 12 assists for Sacramento, which won four of its past five at home against Eastern Conference opponents. Cousins, returning after missing the previous game with a strained left hip flexor, scored 13 points and fended off Boston center Kris Humphries down low late for a key layup to aid the Kings.

"We executed our offense and that was the biggest thing," Thomas said. "Even though we went through a stretch where we weren't making a lot of shots, we were able to execute, and we've lacked that in some games."

Forward Jeff Green scored a game-high 29 points for the Celtics, who never led in losing their fourth straight. Green missed his first nine shots from the field and wound up making just 7 of 25.

Cousins spent much of the night battling with Boston forwards Kris Humphries, Brandon Bass, Green and Kelly Olynyk, all of whom poked, nudged, muscled and generally harassed Cousins enough to draw his 13th technical foul of the season, which tied Los Angeles Clippers forward Blake Griffin for the most in the NBA.

Cousins also failed to block a shot for the first time in 17 games.

"We got the win, so that's what matters," said Cousins, who declined to discuss his matchup with Humphries.

Cousins nearly drew a second technical foul when Humphries impeded Cousins' progress as he ran down the floor in the fourth quarter. Cousins threw an elbow at the Boston center that officials did not see.

"It's a physical game and we can't let people get under our skin and get in the way of what we're trying to do," Kings coach Michael Malone said.

Thomas said, "Other teams are going to try to rile him up. We might not like it, but that's the way it is."

Tempers were at a short fuse on the other side, too. Boston was called for three technical fouls and coach Brad Stevens and guard Gerald Wallace were ejected in the fourth quarter.

"I'll just avoid talking about it," Stevens said of his ejection. "That's probably the best thing."

Humphries finished with 19 points and Bass added 12 points for the Celtics, but Boston lost its 14th straight against a Western Conference opponent.

After trailing 49-33 in the second quarter, the Celtics briefly tied the score with an 11-0 run midway through the fourth quarter. Olynyk made a 3-pointer for his only bucket on one possession, then hit one of two free throws after a flagrant foul called on Kings forward Carl Landry to make it 85-85 with 6:13 to go.

But after a Cousins free throw, Gay connected on a mid-range jumper from the wing, then drove the hoop and drew a goaltending for a 90-85 lead. Then Gay knocked down two free throws. And with the Celtics within six, Gay's layup drove home the final nail.

Guard Ben McLemore scored 11 points for the Kings. forwards Jason Thompson, Derrick Williams and Landry all added 10 for Sacramento.

It was the first time since Feb. 27 of last season against the Orlando Magic that the Kings had seven players in double figures.

Kings forward Reggie Evans, acquired with guard Jason Terry from the Brooklyn Nets on Wednesday, did not play in his Sacramento debut.

NOTES: Kings G Jason Terry, acquired Wednesday from the Brooklyn Nets along with F Reggie Evans, will miss the rest of the season to rehab a left knee that has bothered him all season. Sacramento GM Pete D'Alessandro said the Kings want Terry to return at full strength next season. The 15-year veteran averaged a career-low 4.5 points in 35 games with Brooklyn after having surgery on the knee before the campaign. ... Boston C Jared Sullinger missed the game after suffering what the team called a "mild concussion" during Friday's loss at the Los Angeles Lakers. ... The Kings were allowing opponents to shoot 43.4 percent from the field in their first eight games in February, the fourth-best mark in the NBA. They also were fourth in offensive rebounding during the month (12.5). ... After losing to the Lakers on Friday night, the Celtics had been outscored by an average of 13.2 points in dropping 11 straight against Western Conference opponents.