TRENTON — Call it a clash of the titans, with billions of dollars at stake.

Lawyers for the state and the nation’s professional and collegiate sports leagues tangled in federal court today over New Jersey’s new law allowing sports wagering in Atlantic City casinos and at its four horse racing tracks.

In a case that could turn out to be one for the history books, the first question to come up was whether the leagues even had standing to challenge the state law, and U.S. District Court Judge Michael Shipp, sitting in Trenton, said he would rule on that by Friday.

The case — which grew heated before anyone had even entered a courtroom — pits Gov. Chris Christie, Assembly Speaker Sheila Oliver, Senate President Stephen Sweeney and the New Jersey Thoroughbred Association against Major League Baseball, the National Football League, the National Basketball Association, the National Hockey League and the National Collegiate Athletic Association.

Anticipating a challenge to the state, Christie said in May that "if someone wants to stop us, then let them try to stop us."

The leagues, in turn, slammed Christie and the state in depositions.

David Stern, the NBA commissioner, said New Jersey had "no idea what it’s doing and doesn’t care because all it’s interested in is making a buck or two."

Bud Selig, the baseball commissioner, said he was appalled and stunned, going as far as to say, "This is corruption, in my opinion."

New Jersey voters approved a referendum last year authorizing the Legislature to allow sports wagering at the casinos and race tracks. The state Senate and Assembly then passed a bill legalizing the betting despite a 20-year-old federal law — sponsored by former U.S. Sen. Bill Bradley, a New Jerseu Democrat — making it illegal in all but four states: Nevada, Delaware, Oregon and Montana.

The leagues filed the lawsuit in August. The state, which is preparing to issue the licenses for sports betting as early as next month, hit back, saying the federal law was unconstitutional on the ground that it favored some states over others. But today’s arguments focused simply on whether the leagues had the standing to bring the suit.

Jeffrey Mishkin, a sports lawyer from the prestigious firm Skadden, Arps who was representing the leagues, said that to be eligible to fight the law the leagues had only need to show they have a "sufficient stake ... that sufficient identifiable trifle" in how the law would affect them to have standing.

Ted Olson, a former United States solicitor general who was representing the Christie administration in the case, said the leagues needed to demonstrate more than just a "perception" that the law would hurt their business.

"The Supreme Court has repeatedly said that it might be a trifle, but it has to be an actual, identifiable, particularized, concrete injury," Olson said.

Mishkin further argued that expanding sports betting would hurt how fans feel about the game.

"Three will be greater suspicion about all of the normal incidents of the game," he said. "Every dropped pass, every missed free-throw will now be an object of suspicion."

He said the sports betting would encourage illegal gambling because it would create a "whole new category of gamblers" whom bookies could offer better odds.

"It fuels illegal gambling," he said. "It creates more illegal gambling because legal gambling can never compete with illegal gambling."

Proponents, on the other hand, contend sports betting will generate revenue for the struggling race tracks and Atlantic City casinos, which will in turn help the state as it tries to climb out of a recession.

The state argued that illegal sports betting is a $380 billion industry that the government was merely trying to regulate.

"What they’re complaining about is shining sunlight on the activity that already exists," Olson said. "We want to make sure it’s clean. We want to make sure it’s regulated. And we want to receive the revenue that’s going elsewhere with respect to taxation or into the hands and pockets of gangsters."