HOUSTON — One hour after getting some help from afar, the New Orleans Pelicans could not help themselves in the battle for the Western Conference’s final playoff spot.

New Orleans squandered a nine-point second-half lead and fell to the Rockets 121-114 on Sunday night at the Toyota Center.

More importantly, the Pelicans missed a golden opportunity to take charge in the battle for the No. 8 seed after Oklahoma City lost to the Indiana Pacers 116-104 earlier in the evening.

The teams remain tied with two games to play apiece. New Orleans holds the tiebreaker based on its head-to-head season advantage over the Thunder.

New Orleans (43-37) plays at Minnesota on Monday and finishes the season against San Antonio at home Wednesday. Oklahoma City (43-37), which could be playing one game without star guard Russell Westbrook after he picked up a 16th technical foul Sunday, hosts Portland on Monday and finishes at Minnesota on Wednesday.

“Our guys are just as focused now after the loss than before because they know what is at stake,” Pelicans coach Monty Williams said. “We just need to get better and focus on the little things.”

With four minutes to go in the third quarter Sunday, it looked like the Pelicans were in control, holding an 80-71 lead. But Houston (54-26) outscored New Orleans 41-20 down the stretch, with James Harden finishing with a game-high 30 points.

Corey Brewer came off the bench to score 15 during the pivotal stretch in the second half.

“We let them back in, and they made the big push at the end,” Pelicans guard Eric Gordon said.

“After they tied it up, they made a lot of plays toward the end of the game. They got their shots, and they got their free throws.”

Houston got to the free-throw line 48 times. The Rockets converted those into 34 points, compared to the Pelicans’ 15-of-22 effort from the line.

“We didn’t play smart tonight,” Williams said. “We gave them 48 free throws, and they scored 69 points in the second half. We can’t do that.”

Harden made all nine of his free throws and hit 10-of-18 shots from the field.

“Even though they tried to hack-a-whatever, we still got stops,” Harden said. “We still pushed it out and we still did the right things, and that’s the most important thing.”

The Pelicans were led by Anthony Davis, who scored 27 points on 10-of-16 shooting.

Jrue Holiday came off the bench to score 17 points in his second game back from injury, and five other Pelicans reached double digits in scoring.

“It’s tough because we were in a great position and we had control,” Davis said. “It’s tough because we wanted to win so bad because we were in a great position.”

Dwight Howard added 19 points and 11 rebounds for Houston. Josh Smith scored 15 points, while Jason Terry and Pablo Prigioni added 12.

“We found a way to go out there and get a win,” Rockets coach Kevin McHale said. “New Orleans always plays us well. Overall, we had a great stretch where we really got out and pushed the ball.”

Houston made 59.5 percent of its shots in the second half, including 5 of 12 from 3-point range.

New Orleans made 48.4 percent of its shots for the game and 11 of 27 3s, including three apiece from Quincy Pondexter, Holiday and Gordon.

“We played a great first half and we were up most of the game, but we broke down during the stretch,” said Pelicans forward Ryan Anderson, who scored 15 points. “They can score the ball in a lot of ways. They had a huge run, and it came at the right time for them.”

Now it’s off to Minnesota to try to hold serve for the final playoff spot. Even after Sunday’s loss, a Pelicans win and Thunder loss Monday would clinch the Pelicans’ first playoff berth since 2011.

“We knew Houston was going to be a tough game, and we can’t let this affect us,” Gordon said. “We will go to Minnesota with a winning mindset. We just need to control our own destiny.”