Robin Lopez may not have been the best big man on the market or even a splashy name, but he was the best one willing to take the Knicks' money.

After failing to land free-agent big man Greg Monroe, the Knicks rebounded quickly and secured the former Blazers starting center.

Lopez, whose twin brother, Brook, plays for the Nets, agreed to join the Knicks on a four-year, $54-million contract, league sources confirmed. The Knicks had a commitment from Lopez on Thursday night but the details were still being hammered out. They reached an agreement yesterday.

"Excited to be part of the #Knicks legacy!," Lopez tweeted. "It's going to be like 'On the Town' but w/way more box outs & dunks #ModeledMyGameAfterGeneKelly."

The Knicks also reached an agreement with forward Derrick Williams on a two-year, $10-million deal, a league source said. The second year is a player option.

Lopez's deal was contingent upon Clippers free-agent center DeAndre Jordan not choosing to play for the Knicks. They were never considered contenders. Jordan ultimately spurned the Clippers and picked the Mavericks, and the Knicks got the center they needed.

advertisement | advertise on newsday

Lopez, the No. 15 pick in the 2008 draft, was a valuable member of the Trail Blazers the past two seasons. He averaged 10.5 points, 7.8 rebounds and 1.6 blocks in 141 games.

Williams has been a disappointment since being taken second overall out of Arizona in the 2011 draft, but the Knicks hope he can provide some scoring. He's averaged 9.3 points and 4.3 rebounds in four seasons with the T-Wolves and Kings.

No deals can be announced or signed until Thursday.

Knicks president Phil Jackson's moves thus far haven't created a lot of buzz or been ones some Knicks fans -- and perhaps Carmelo Anthony -- hoped. Jackson is putting together a roster he hopes will be competitive after a 17-65 season.

Lopez and Afflalo address the Knicks' defensive needs that Jackson said would be a priority this offseason.

Knicks videos

The Knicks now have nine players, so Jackson still has plenty of work to do to fill out his team. The Knicks still have roughly $2.5 million plus the $2.8-million midlevel exception to use in free agency.

They also hope to bring back some of their own free agents, including Jason Smith, Lance Thomas and Lou Amundson.

No deals can be announced or signed until Thursday.

Lopez wasn't the Knicks' first choice or second or third. The Knicks never got an audience with center Marc Gasol, who is expected to re-sign with Memphis. Portland big man LaMarcus Aldridge canceled his Thursday meeting with Jackson and the Knicks, but they were long shots at best. Monroe was the Knicks' main target, but he's going to the Bucks on a three-year, $50-million deal.

The Knicks met with Lopez on Wednesday in Los Angeles. The 7-footer should help the Knicks with his defense and energy. He has averaged 8.2 points, 5.0 rebounds and 1.4 blocks over seven seasons for the Suns, Pelicans and Blazers.

advertisement | advertise on newsday

On Friday, the Knicks met with veteran swingman Corey Brewer, who chose to return to Houston on a reported three-year, $23.4 million deal. The Knicks acted quickly and locked up Williams after meeting with him Friday.

Harris gets $64M. The Magic and Tobias Harris (Hills West) have agreed to a four-year, $64-million deal, the Orlando Sentinel reported . . . The Kings reached agreements with guards Rajon Rondo and Marco Belinelli, sources said. Rondo's deal is for one year and $10 million, and Belinelli's is for three years and $19 million. -- APThe Dolan family owns controlling interests in the Knicks, Madison Square

Garden and Cablevision. Cablevision owns Newsday.