New Jersey Gov. Chris Christie has signed a bill into law legalizing sports betting in his state -- but only after a federal ban on such gambling is overturned.

The governor signed a bill that was passed overwhelmingly by both houses of the state legislature. It would legalize betting on professional and collegiate sporting games at the Atlantic City casinos and the state's four horse tracks.

Voters signaled by a 2-to-1 margin in a nonbinding referendum in November they want sports betting to be legal.

Now comes a court battle against a federal law making it illegal to bet on sports in all but four states.

Proponents say the law would reclaim millions of dollars from illegal bookies, and give Atlantic City another attraction to bring visitors to the casinos.

(Copyright 2012 by The Associated Press.  All Rights Reserved.)