HOUSTON — Jeremy Lin was so unhappy with his performance in Houston’s Game 4 loss to Portland that he hardly slept l after the game.

Lin should sleep like a baby after his work in Game 5.

Dwight Howard had 22 points and 14 rebounds, and Lin came off the bench to score 21 points and help the Rockets beat the Trail Blazers 108-98 on Wednesday night to avoid elimination.

“I just tried to be aggressive,” said Lin, who had four points and three turnovers in Sunday’s overtime loss. “I felt like I needed to be a spark for the team.”

    Most Read Stories

The Trail Blazers lead the first-round series 3-2 entering Game 6 on Friday in Portland.

A basket by Damian Lillard got the Trail Blazers within two points before James Harden stepped back and swished a three-pointer to make it 103-98 with about three minutes left. The shot brought the crowd, which was clad almost completely in red shirts emblazoned with the words “Clutch City” on them, to its feet.

That started an 8-0 Houston run to close it out. Harden finished with 17 points and seven assists.

“I really hadn’t done anything the first two quarters, so it was time for me to step up and make plays,” Harden said.

Houston finally slowed down LaMarcus Aldridge, limiting him to eight points, after he averaged 35.3 points in the first four games. Wesley Matthews led the Blazers with 27 points and Lillard added 26.

“We had opportunities to make shots, but we didn’t make certain shots that we needed,” Aldridge said. “We didn’t get the big stops that we needed. They played well down the stretch and we didn’t.”

Lin got extended minutes with Pat Beverley dealing with a 101-degree fever. Beverley had five points in 21 minutes.

The Trail Blazers said the two shots Lin hit as the shot clock expired were deflating.

“He threw up some crazy shots,” Lillard said. “That’s when you know a guy is having a good night.”

The Rockets led by as many as 17 points in the first half. Portland cut it to one point three times in the fourth quarter, but never went back on top.

SAN ANTONIO — Tony Parker had 23 points hours after the birth of his first child and San Antonio never trailed in a 109-103 victory over Dallas, taking a 3-2 lead in the first-round series.

Manu Ginobili had 19 points and Tiago Splitter added 17 points and 12 rebounds as San Antonio regained home-court advantage. Tim Duncan added 16 points and 12 rebounds and Kawhi Leonard had 15 points for the Spurs.

Vince Carter scored 28 points on 10-for-16 shooting from the field for Dallas. After averaging 16 points in the series’ first four games, Mavericks forward Dirk Nowitzki scored 26 points on 10-for-20 shooting.

Carter’s three-pointer with three minutes left cut Dallas’ deficit to 98-94 but Parker followed a minute later with his only three-pointer of the game.

Game 6 is Friday night in Dallas.

TORONTO — Kyle Lowry scored a career-playoff-high 36 points, including the go-ahead three-pointer after Toronto had blown a 26-point lead, and the Raptors beat the Brooklyn Nets 115-113 to take a 3-2 lead in their first-round series.

DeMar DeRozan had 23 points, Jonas Valanciunas scored 16 and Greivis Vasquez added 15 for the Raptors, who would advance to face Miami in the second round with a victory in Game 6 on Friday in Brooklyn.

Joe Johnson scored 30 points and Mirza Teletovic had 17 for the Nets, who scored 44 points in the fourth quarter but lost their final chance when Andray Blatche fired a pass well over Deron Williams’ head into the backcourt for a turnover.