OAKLAND, Calif. -- James Harden sat in a chair in the visitors locker room with his feet in a bucket of ice and his knees wrapped in bandages when somebody plopped a laptop on his thighs to watch the replay of his scary fall.

The bearded All-Star guard played through the pain in his right ankle and his already nagging left knee to finish with 27 points and seven rebounds, stealing the spotlight from backcourt teammate Jeremy Lin in the Houston Rockets' 116-107 victory over the slumping Golden State Warriors on Tuesday night.

"Very tough. I can barely walk. Still limping," Harden said. "I kind of felt the momentum going our way in the third quarter so I didn't want to shut it down."

He didn't.

And neither did the rest of the Rockets.

Chandler Parsons had 21 points, 9 assists and 8 rebounds, and Lin added 14 points and 10 assists to help Houston past his former team for the second time in eight days.

A week after the Rockets tied the NBA record with 23 made 3-pointers in a testy 140-109 rout of the Warriors, Harden took the Bay Area rematch off script.

Harden, Houston's lone representative when it hosts the All-Star Game on Sunday, stepped on David Lee's left shoe going for a fast-break layup and his foot twisted violently.

He left the game before briefly returning to finish 7-for-22 from the floor, making some key baskets late.

Harden said he'll worry about the NBA's marquee event after the Rockets play at the Los Angeles Clippers on Wednesday night. He hopes to play in that game, too.

"Why not? I'm tough," he said, smiling.

"It looked kind of nasty," Rockets coach Kevin McHale said of Harden's tumble. "I give him a lot of credit. He came back, and we needed him."

The Warriors, meanwhile, can't seem to stop their tumble.

Stephen Curry had 27 points and six assists, and Jarrett Jack scored 22 points off the bench after missing the previous three games with a right shoulder injury for the Warriors, who head into the All-Star break on a season-high five-game losing streak. The first four losses had come on the road.

"We're not there yet. We're not where we think we are," said Warriors center Andrew Bogut, who had six points and 12 rebounds. "I think we thought we were maybe a little better than we were."

The Rockets certainly seemed more riled up for the Warriors' return to Oracle Arena than the home team.

Houston, which went 10-for-34 from 3-point range, had made 23 of 40 shots from beyond the arc against Golden State last week. Some Warriors players were upset about what they perceived as excessive celebration from the Rockets, and Warriors coach Mark Jackson ordered his players to foul in the final minutes just so the Rockets wouldn't surpass the record, which upset some Houston players.

The game also marked the first appearance in the Bay Area for Lin, who grew up in nearby Palo Alto, since "Linsanity" swept through the NBA a year ago.

The Warriors waived Lin before last season after he played sparingly as a rookie, Houston signed him for a couple of weeks before cutting him and then the Knicks decided to give him a look.

Lin became a sensation in New York. His burst of brilliance on Broadway earned him a three-year, $25 million deal with Houston that the Knicks declined to match.

Lin's backcourt teammate instead was the one who gave Golden State fits.

Harden, wearing a protective sleeve around his knee, landed hard after missing a fast-break layup over Bogut in the first quarter while the Warriors built a nine-point lead. Harden held his knee and limped to the bench during a timeout but stayed in the game.

The Harden-Lin duo dodged defenders and drew fouls with relative ease. The pair combined to go 19-for-19 on free throws, including 15-for-15 in the first half to help Houston take a 57-56 lead at the break.

Golden State had allowed at least 60 points in the first half of each of the previous four games.

"I thought for 48 minutes we didn't defend our brand, so it's been consistent with what we've done the last four games," Jackson said.

Harden limped around trying to shake off the pain from his collision with Lee before he made both free throws. He walked gingerly to the locker room and returned a few minutes later, highlighting a 13-5 spurt with a driving dunk that helped Houston take an 88-77 lead that allowed it to cruise in the fourth quarter.

"I was hoping it wasn't bad. I saw the ankle turn and I was like, 'Oh, that's bad for sure,'" Lin said. "He came back out and he played through a lot of everything."

Game notes
The Warriors had won their last game before the All-Star break the previous nine seasons. The Warriors have sold out 14 straight games, the longest since a renovation prior to the 1997-98 season that increased capacity from 15,025 to 19,956. The Warriors hosted Asian Heritage Night. A portion of event-night ticket sales benefited the AsianWeek Foundation's efforts to increase awareness for Hepatitis B.