The Brooklyn Nets and Orlando Magic attempted to execute a last-gasp deal that would send All-Star center Dwight Howard to the Nets, but they could not reach an agreement and talks between the two sides have ended, a source familiar with the negotiations said.

The Nets effectively ended their pursuit of Howard by agreeing to terms with center Brook Lopez on a four-year, $60 million max contract, a league source confirmed to ESPNNewYork.com.

Sources said earlier Wednesday the Nets had decided to "resolve" their situation with Howard by 6 p.m. ET.

That inspired renewed talks, in which the Nets offered four future first-round picks, Lopez and power forward Kris Humphries in sign-and-trade deals and $3 million to acquire Howard, Jason Richardson, Chris Duhon and Earl Clark, the source said.

That offer was rejected by the Magic, who did not want Humphries and also wanted to unload Quentin Richardson. Brooklyn's sign-and-trade proposal would have involved Humphries signing a heavily front-loaded multiyear contract, with only the first-year salary fully guaranteed.

Without a third team to take Humphries, the Nets had no choice but to reject the Magic's counteroffer and extend Lopez, who cannot be traded until Jan. 15 because of the new collective bargaining agreement's rules.

"We've moved on. It just got to a point where we couldn't keep going back and forth with Orlando. They had about 14 days to do something and didn't. We just had to move on, and we felt that way this morning," a Nets source told ESPNNewYork.com's Ian O'Connor.