CHICAGO(AP) The way the Chicago Bulls were converting their free throws, the odds that their performance at the line could actually cost them seemed as long as a full-court heave.

And it nearly happened.

Ben Gordon scored 24 points and the Chicago Bulls beat the Sacramento Kings 99-94 on Tuesday night to snap a three-game losing streak.

The Bulls converted 33 of 36 free throws, but the three they missed nearly cost them.

After making its first 29, Chicago converted just four of its final seven, allowing Sacramento to stay in the game. Drew Gooden had two of the misses, nearly spoiling a big return in which he had 18 points and 10 rebounds after being sidelined for eight games with a sprained right ankle.

"It would have taken a toll on me, because a lot of people were asking when I was going to get back, (saying) the team needs me,'' Gooden said.

Trailing 97-94 after Gooden hit 1-of-2 with 9.1 seconds left, Sacramento had a chance to tie it. But Kevin Martin missed a finger roll with 4 seconds left, and Thabo Sefolosha hit two more free throws to seal it for Chicago.

"It's just a play where I come up the middle and if the 3 is open, take it,'' Martin said. "But I think we needed a 3. I just felt pressure, and I went to the hole and missed it.''

Coach Kenny Natt had no problem with Martin driving. But the shot itself caught him off guard.

"They collapsed on him,'' he said. "We thought he would kick it to one of the other players and it didn't happen.''

That decision capped another rough night for the lowly Kings, who have dropped 10 of 11 even though Martin scored 29. And it was far from an impressive win for the Bulls, who were coming off a 10-point loss to Minnesota.

About the only area where Chicago excelled was at the foul line - for most of the night, anyway. The Bulls would have broken the club record for free throws without a miss in a game (25-for-25 against Houston on Feb. 9, 1977) had they not struggled at the end.

The Kings were closing in on the Bulls even before the misses started to pile up.

Chicago built several double-digit leads in the second half, only to see Sacramento cut into it each time. Larry Hughes' jumper made it 84-70 less than four minutes into the fourth quarter, but the Kings responded with a 10-0 run that Francisco Garcia capped with a dunk.

Garcia made another nice play to cut Chicago's lead to 90-89 with about two minutes left. He poked the ball away from Derrick Rose as he attempted a crossover, and broke for a layup.

Gordon then hit two free throws, making Chicago 28-for-28, and Larry Hughes added one to make it 93-89 with 1:01 left before clanging the second attempt. That's where the problems at the line started.

Rose's floater made it 95-91 with 33 seconds remaining, but Martin responded by making two of three foul shots with 21.9 seconds to go.

The Kings immediately fouled Gooden, who missed the first and made the second. After a timeout, Martin drove past Sefolosha and got fouled by Tyrus Thomas, the ball rolling around before falling to the side. So instead of a possible three-point play, he made the first of two free-throw attempts with 13.9 seconds left to make it a two-point game.

Brad Miller outmuscled Gooden for the rebound after Martin missed the second attempt. But rather than go back up, he passed to Martin, who missed a 15-foot baseline jumper and the Bulls hung on.

Martin had another strong outing for the Kings after scoring 36 against New Jersey on Monday and 45 against Indiana two days earlier, and Miller finished with 18 points and 12 rebounds.

But the Bulls prevailed thanks to Gordon, Gooden and solid outings by Rose (16 points and eight assists) and Thomas (14).

"That's a team we should be able to beat and we needed to be able to take advantage of that,'' Gordon said.

Notes: Bulls coach Vinny Del Negro said he hopes to have F Luol Deng back against Washington on Friday. Deng sat out his sixth straight game with a sprained left ankle. ... Sacramento C Spencer Hawes scored three points after missing four games with an abdominal strain.

Copyright 2008 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited