Ilya Kovalchuk's plan to spend the rest of his career with the New Jersey Devils took a big hit just hours after the star forward's unprecedented deal was announced. Kovalchuk beamed Tuesday during a news conference after receiving a 17-year, $102 million contract with the Devils – the longest deal in NHL history. But before the day was finished, he was in limbo again. Just one day after Kovalchuk and the Devils agreed to the record-setting contract, the league determined that it was illegal, a person familiar with the issues raised told The Associated Press on condition of anonymity because the NHL hadn't made a formal announcement. The contract was rejected because years of low salary at the end of the deal were added for the sole purpose of lowering the cap hit. The person added that it was determined that neither the Devils nor Kovalchuk believe he will play the final years of the deal at those terms. The All-Star was slated to earn only $550,000 in each of the last five seasons of the contract that was to run through the 2026-27 season, when Kovalchuk will be 44. Kovalchuk was to earn $98.5 million of the $102 million in the first 11 years of the deal. Neither the Devils nor Kovalchuk's agent, Jay Grossman, commented after the contract was rejected. Based on provisions in the collective bargaining agreement between the players' association and the league, the union has five business days after being informed that the contract was rejected to file a grievance on behalf of Kovalchuk. The deal would remain voided if no grievance is filed or if an arbitrator agrees that the contract is illegal. The arbitrator would have 48 hours to decide if the league was right to reject the contract. If the arbitrator agrees, the contract would be voided, and Kovalchuk would again be an unrestricted free agent. Kovalchuk and the Devils both expressed relief earlier Tuesday that negotiations were over and that his long-term hockey future would play out in New Jersey. Now there is no assurance he will ever play for the team again. Kovalchuk smiled throughout a news conference at the Devils' home arena in which he officially returned to the team after a lengthy free-agent courtship. Kovalchuk finished last season with the Devils after being traded by the Atlanta Thrashers, who couldn't get him signed before he was set to hit the open market. Kovalchuk dismissed money as a main factor in his decision to stay with New Jersey. He instead cited long-term security for him and his family and the opportunity to win the Stanley Cup with an organization that boasts three titles in 15 seasons. Kovalchuk's contract would have topped the 15-year deal goalie Rick DiPietro got from the New York Islanders, and two-time NHL MVP Alex Ovechkin's 13-year pact with Washington. Kovalchuk was to earn $6 million each of the next two seasons, $11.5 million for the following five seasons, $10.5 million in the 2017-18 season, $8.5 million for the 2018-19 season, $6.5 million in 2019-20, $3.5 million in 2020-21, $750,000 the following season, and $550,000 for the final five years of the unprecedented deal. The Devils would have absorbed an annual salary-cap hit of $6 million – the average amount per season. That number was brought down because of the extended years at low salary at the end. Whether he and the Devils can agree a new deal remains to be seen. The Los Angeles Kings and the Russian KHL were also interested in signing Kovalchuk before he reached agreement with the Devils two weeks into the free agent shopping season.