Nassau police arrested a man they said was dealing pills at a Westbury bar early Saturday morning, officials said.

Nicholas Mayfield was at Houlihan’s on Merrick Avenue, where police said he was selling pills while at the bar.

advertisement | advertise on newsday

Detectives from the Third Precinct arrived and found Mayfield outside the establishment with 42 oxycodone and 28 alprazolam pills at about 12:30 a.m., police said

Mayfield, 33, of Wendell Street in Hempstead, was arrested and charged with criminal possession of a controlled substance in the third degree and fifth degree, and two counts of criminal possession of a controlled substance in the seventh degree, police said. He was also charged with disorderly conduct stemming from an open warrant from 2015, police said.

Mayfield was arraigned Saturday in First District Court in Hempstead, where he was held on $40,000 bond or $20,000 cash, according to court records. It was not immediately clear if Mayfield retained an attorney. He is due back in court on May 2, records show.