The most seriously-charged student in last year’s big drug bust at Columbia University is now leaning toward going to trial thanks to the recent gambling arrest of an undercover on the case.

The arrest of Det. Richard Palase last week for allegedly running a $6,000-a-day Staten Island poker ring has thrown a big, damaging monkey wrench into the drug case against the student, his lawyer told The Post.

“This certainly makes me more confident to take the case to trial,” said lawyer Matthew Myers, who represents student Harrison David.

“And I don’t think the jury is going to look very kindly on the testimony of an undercover who’s been less than truthful with the police department for the last several years,” Myers said of the 15-year NYPD vet.

While the other four students are eligible for probation, Harrison faces a minimum of three years prison and as much as 10 on charges that he helped Palase ferry cocaine in bulk from the non-student dealers to the students, said Myers.

But with Palase’s credibility damaged, Harrison may be able to convince a jury of an “agency” defense — that in allegedly handling the cocaine, Harrison was merely acting as an agent of the guy he believed to be the “actual” dealer, Palase, Myers said.

Palase’s undercover work in the Columbia ring — in which he posed as a drug dealer — has already been critical to winning guilty pleas from three non-student dealers who have already been sentenced and waived their right to appeal in the case, according to a law enforcement source.

But officials insist Palase is only of “peripheral” importance to the cases against the students — David, 21; Chris Coles, 21; Adam Klein, 21; Joseph Stephan Perez, 20; and Michael Wymbs, 19.

“At this point we don’t foresee any significant impact,” from Palase’s arrest on any of the defendants, said a spokeswoman for the city-wide Special Narcotics Prosecutor Briget Brennan.

All five students in the Columbia drug ring case are scheduled to return to Manhattan Supreme Court on June 21.

Palase’s role in the Columbia University drug ring was first reported in DNAinfo.com.