Prosecutors and the defense both teed up golf superstar Phil Mickelson as the key figure who could swing the case in their direction as the insider trading trial of Las Vegas pro gambler William “Billy” Walters opened Wednesday in Manhattan federal court.

Walters is accused of making $32 million off insider tips from Dean Foods chairman Thomas Davis and sharing some of them with Mickelson, who was not charged but agreed to pay back nearly $1 million in profits.

Prosecutor Michael Ferrara told jurors in his opening statement that one-time World Series of Poker champion Walters showed just how certain he was of his tips by sharing them with celebrity pal Mickelson.

“He wanted his friends to trade Dean Foods too because he knew he had a sure thing,” the prosecutor said. “ … That’s another way you know that Walters had the hottest information in town.”

But defense lawyer Barry Berke argued that Walters’ used his sports-betting skill set to succeed in stock-trading, and said if he had relied on illegal tips he wouldn’t have risked drawing market monitors’ attention by involving a famous athlete like Mickelson in a suspicious trading pattern.

“Bringing all this attention would be akin to a bank robber putting on a mask, sticking up a bank stuffing the note to the teller in his pocket, and then stopping to ask a police officer for directions,” he said. “It makes no sense.”

advertisement | advertise on newsday

Walters, 70, who parlayed success in poker and sports betting into a small empire of auto-dealerships and golf courses, is accused of scheming with Davis from 2008 to 2014 to trade off advance tips on earnings and a spinoff at Dean, a Fortune 500 milk and dairy products distributor.

Ferrara said Davis, who pleaded guilty and is cooperating with the government, would testify that he passed tips to Walters first out of friendship and later in return for loans to help him repay debts.

He said the two often spoke on a “burner” cellphone they called the “Batphone” — which Davis threw in a creek right after the FBI questioned him — and phone records would show that right after their conversations Walters frequently called his broker to place large Dean orders.

“He was a cheater trying to look like a genius,” Ferrara said. “He was the kid who aces the test because someone gave him the answers in advance.”

But Berke said Davis got in trouble by stealing money from a nonprofit he ran, and then made up lies — a story the lawyer called “Bat-phony” — about passing information to Walters to try to get a deal from the government.

He described Walters as a man who grew up poor in Kentucky but had a native genius for gambling, a gut instinct about “tells” to guide winning bets, a “prodigious work ethic” and a willingness to take huge risks on a moment’s notice.

“Mr. Walters took the same skills that made him so successful in sports gambling and poker and he applied them to investing,” Berke said.

Mickelson, according to an SEC complaint filed last year, made $931,000 in a week trading on a tip from Walters in 2012, and repaid gambling debts from his profits.

Although he was featured in the opening statements, neither side said explicitly that Mickelson would be called as a witness.