NEW YORK — The young Knicks played with poise down the stretch.

Emmanuel Mudiay scored a season-high 27 points, rookie Allonzo Trier had a career-high 25 and New York rallied in the fourth quarter to beat the New Orleans Pelicans 114-109 on Friday night.

An undrafted free agent from Arizona, Trier hit two free throws to put the Knicks ahead 104-103, a lead they never relinquished in winning consecutive games for the first time this season.

"I think we have been growing. We are starting to see each other better," Trier said. "We understand the things we need to do in order to close out games. I think it's the little things, the detail things, that we were better at tonight."

Enes Kanter scored 17 for the Knicks and Noah Vonleh had 14.

Anthony Davis finished with 33 points and 12 rebounds for New Orleans. Jrue Holiday scored 22 points and Nikola Mirotic added 19.

New York trailed 101-92 midway through the fourth quarter.

Mudiay's steal and two free throws with 1:09 to play gave the Knicks a 106-103 lead. Milotic missed a 3-point attempt and Mudiay hit a driving layup with 34 seconds left.

"We were just being aggressive, that is what it was," said Mudiay, a 2015 Nuggets lottery pick in his second season with the Knicks. "We got a couple of stops that we wanted. I think that is what really changed the game."

The Pelicans pulled to 111-109 on Davis' uncontested dunk with 8.2 seconds left. But Mudiay hit another free throw and Tim Hardaway Jr. added two more for the final margin.

"We didn't play very good down the stretch. They didn't play very good either, but they played well enough to win the game," Pelicans coach Alvin Gentry said.

Davis did not play in the fourth quarter until only 3:18 remained.

"He said he thought he had a pull in his groin or something, but he came back (to the coaches) and said he felt pretty good about it, so we stuck him back in," Gentry added.

The Pelicans led by nine in the first quarter, but New York scored the first seven points of the second to take its first lead since the opening basket. The Knicks then increased their advantage to 52-45 on Mudiay's driving layup with 3:15 left.

Davis' three-point play with 3.6 seconds remaining gave the Pelicans a 60-59 lead at halftime. He had 24 points and 10 rebounds at the break.

New Orleans led 90-87 after the third quarter.

"We beat the Pelicans," Kanter exclaimed. "The bird can't even fly."

TIP-INS:

Pelicans: New Orleans, who had won the last two meetings, leads the all-time series 19-17. The Pelicans had not lost to the Knicks at Madison Square Garden since November 15, 2015 (95-87).

Knicks: Hardaway missed his first 11 shots before finally connecting on a 3-pointer with 7:10 remaining in the third quarter. He finished the night 2 for 15.

FOR STARTERS

No Knick player has started every game this season, while the Pelicans have two players, Holiday and E'Twaun Moore, who have been on the floor for the start of each of New Orleans' 19 games.

MY OLD KENTUCKY HOME

Five players who appeared in the Knicks-Pelicans game on Friday night attended the University of Kentucky. Former Wildcats Davis, Julius Randle and Darius Miller competed for New Orleans, while Kanter and Kevin Knox appeared on the floor for the Knicks. Kanter, who attended Kentucky as a freshman, never played for the Wildcats after being declared ineligible by the NCAA for having received impermissible benefits while playing for the Turkish club team Fenerbahce.

HAPPY HOLIDAY

Holiday, who has reached double figures in all but one game this season, is averaging a career-high 20.1 ppg. Now in his sixth year with the Pelicans, the 10-year veteran averaged a season-best 19.0 ppg for New Orleans last season.

UP NEXT

Pelicans: Visit Washington on Saturday.

Knicks: Visit Memphis on Sunday.