Jameer Nelson and the Orlando Magic reached an agreement Tuesday night on a contract extension that will keep the point guard with the team for at least five more seasons, according to a source familiar with the negotiations.

Nelson had until midnight Wednesday to get an extension signed or he would have become a restricted free agent next summer. Fearing that he might have had to play this season without a contract extension, Nelson revealed recently that he had taken out an insurance policy to cover him in case of a career-threatening injury.

The exact specifics of the deal were unknown, but the Magic had been offering Nelson a five-year, $30 million deal. Nelson, 25, had hoped to get a contract similar to the $42 million pact that point guard Devin Harris signed with the Dallas Mavericks.

It is believed that the two sides met somewhere in the middle.

``I?m a starting point guard. I need starting point guard money,?? Nelson said on Monday, a day before the deal was finalized.