PHOENIX, Nov. 6 (Ticker) -- Shareef Abdur-Rahim more than atoned for a pair of missed free throws.

Abdur-Rahim scored six points in the final 39 seconds - all of which provided a tie or the lead - as the Sacramento Kings survived in a 118-117 victory over the Phoenix Suns, who remained winless at home.

NBA TV highlights from
Kings-Suns:
Play
The Kings squandered a 13-point fourth-quarter lead and trailed, 114-112, with 1:23 to play after a steal, layup and free throw by Leandro Barbosa, who scored a season-high 23 points.

Abdur-Rahim went to the line with 1:16 left but the career 82 percent foul shooter missed both free throws. On Sacramento's next possession, however, he tipped in a miss to tie the game with 39 seconds remaining.

After an offensive foul on Phoenix's Shawn Marion, Abdur-Rahim backed Kurt Thomas into the lane and flipped in a jump hook with 30 seconds to go.

"I am just happy that we got a stop and were able to come back and score and that I got a second chance to redeem myself," Abdur-Rahim said. "I was hoping I would get another chance to do something after missing those free throws because you don't want to go home with that on your conscience."

Barbosa answered nine seconds later with a 3-pointer that gave the Suns the lead, but Abdur-Rahim corralled his own miss and drew a foul with 13 seconds to play, then sank the go-ahead free throws.

On the game's last possession, Boris Diaw missed a reverse layup that was contested by Abdur-Rahim and Brian Grant missed a corner jumper as the Suns (2-2) fell to 0-2 at home.

"We knew they were going to make a run, they always do here," Kings coach Rick Adelman said. "I am disappointed but not surprised that we struggled down the stretch. ... Shareef hit a little jump hook and got fouled, then went to the boards on that last play and got fouled."

Peja Stojakovic ended a slump with 33 points and Abdur-Rahim added 23 for the Kings (1-2), who avoided their second straight 0-3 start. They have yet to play at home.

"We have to build on this win and get better," Stojakavic said. "We have to keep moving with the ball, communicate more and have more trust in each other. It was a good win for us, but we still have a lot of things to work on. But it was a great game for us to get over the hump. We are still learning each other and learning what we can do."

"It is cool that we won the game like this because we battled," Abdur-Rahim said.

Steve Nash had 18 points and 13 assists for the Suns, who had eight players in double figures and wasted a marvelous effort by their bench. Led by Barbosa and 11 points apiece by Diaw and Eddie House, the reserves held a 51-10 scoring edge over the bench of the Kings.

"When the bench comes into the game, we try to play tough defense, but we can score, too," Barbosa said. "I think I am different from last year. I don't turn the ball over as much. I learned a lot and got a lot of confidence when I played for the Brazilian team this summer and that was important for me. It helps me here."

Sacramento gained temporary control with a blistering third quarter led by Stojakovic. In turning a five-point deficit into a 94-86 lead, the Kings made 17-of-26 shots and scored 39 points.

Stojakovic, who had made just 8-of-27 shots in the first two games, was 9-of-10 for 23 points in the period, two shy of the team record held by Mitch Richmond.

"That was probably my best quarter in my career," Stojakavic said. "When you are hot like that, you do want the ball and your teammates are looking for you and in the third quarter both of those things happened. I was in a groove."

Abdur-Rahim's three-point play with 9:03 to go gave the Kings a 104-91 lead before the Suns rattled off nine straight points, including a pair of hoops by House.

Phoenix shot 56 percent (24-of-43) in the first half but led just 60-55 as Sacramento cashed in on 12 offensive rebounds.

"I don't know if we blew it or they won it. It was probably a combination of the two," Suns coach Mike D'Antoni said. "We played pretty well but couldn't stop them in the third, when Peja wasn't missing anything. There were a couple of chances here and there and a call here and there that just didn't go our way."