Omer Asik is heading to New Orleans. (Sue Ogrocki / AP)

The Houston Rockets took a big step toward clearing the kind of salary-cap space needed to make a run at a big-name free agent Wednesday night, agreeing to trade center Omer Asik to the New Orleans Pelicans for a first-round pick in the 2015 draft.

The deal, which won’t become final until July 1, will clear $8.3 million in cap room, a necessary first step if the Rockets are to add LeBron James or Carmelo Anthony to a team that includes Dwight Howard and James Harden. According to the Houston Chronicle:

The pick the Rockets will receive is protected if the Pelicans are in the lottery and would choose in the first three picks or if it falls between 20 and the rest of the first round. It would go to the Rockets the first season the Pelicans are slotted to pick between the fourth and 19th picks. The Rockets will also send the Pelicans $1.5 million to complete the trade.

Asik is due to earn in excess of $15 million in the final season of his contract, but counts $8.37 million against the salary cap. Guard Jeremy Lin has the same contract and by also moving Lin and not picking up nonguaranteed contracts other than point guard Pat Beverley’s, the Rockets would have $17.9 million in cap room to offer a free agent.

Individuals with knowledge of the Rockets’ plans have said for several months that they had reason to believe they would not have trouble completing the deals necessary to offer a free agent at least close to a max contract.

The reason the deal can’t happen before July 1 is because the Pelicans have already traded their 2014 first-round pick and the Stepien Rule prohibits a team from trading first-round picks in back-to-back years.