NEW YORK (CBSNewYork) — Willy Hernangomez, considered just months ago to be a building block for the new-look Knicks, is headed to the Charlotte Hornets.

The Knicks on Wednesday traded the 6-foot-11 Spanish center to Charlotte. The Hornets are sending journeyman power forward Johnny O’Bryant and second-round draft picks in 2020 and 2021 to the Knicks. Yahoo Sports was the first to report on the trade, which the Knicks officially announced Wednesday afternoon.

Hernangomez played his way into the Knicks’ starting lineup last season. In 72 games in 2016-17 (22 starts), he averaged 18.4 minutes, 8.2 points and 7.0 rebounds.

But he reportedly fell out of favor with coach Jeff Hornacek during training camp before this season and had been sitting behind Enes Kanter and Kyle O’Quinn on the depth chart. Hernangomez, 23, has played in just 26 of the Knicks’ 55 games, averaging nine minutes, 4.3 points and 2.6 rebounds in those contests.

He reportedly requested a trade this week. The NBA’s trade deadline is Thursday.

Willy Hernangomez

Knicks center Willy Hernangomez dribbles in front of the Wizards’ Markieff Morris on Jan. 31, 2017, at the Verizon Center in Washington, D.C. (Photo by Patrick Smith/Getty Images)

“Like I’ve said a couple times, I’m 23, I’m hungry, I want to play,” Hernangomez told the Daily News last month. “Whatever happens, I’m ready for it.

“I feel good to know that I’m not even playing and a lot of teams are interested in me. That makes you happy. You can see that you did something good and somebody thinks you can be good in this league.”

MORE: Schmeelk: Porzingis Injury Latest Blow To Franchise Short On Luck

The Knicks acquired Hernangomez in a draft-night trade in 2015. He was selected with the 35th overall pick by the Philadelphia 76ers.

With Hernangomez, Enes Kanter, Kyle O’Quinn and Joakim Noah on the roster, the Knicks had been eager to move at least one of their centers. They are also working to deal Noah, who was sent home from a practice in Denver last month after reportedly getting into a heated verbal exchange with Hornacek.

Noah’s salary — he is owed roughly another $44 million through the 2019-20 season — is an obstacle in trade talks. Hernangomez, meanwhile, has two years remaining on his four-year rookie contract and is guaranteed $1.54 million next season.

O’Bryant, 24, was a second-round pick by the Milwaukee Bucks in 2014. He has played in 36 games for Charlotte this season, averaging 4.8 points and 2.6 rebounds. He also has played for the Denver Nuggets.

Watch & Listen LIVE