A former Southampton Town councilman was sentenced to 2 years in federal prison Friday after pleading guilty to conspiracy to illegally distribute oxycodone.

Bradley Bender, 55, of Northampton, also was sentenced to 3 years of supervised release and has forfeited $5,000 for profits made selling the drug to street-level dealers, officials said.

Bender told U.S. District Judge Arthur Spatt he has been “suffering with addiction since I was 14 years old.”

“I am deeply remorseful. I apologize profusely,” Bender said, breaking into tears. “I lost my job, my marriage and my reputation.”

Bender resigned his council post in November just before pleading guilty — admitting to an oxycodone habit and reselling some of the pain pills for cash and steroids.

In a statement, Eastern District U.S. Attorney Robert L. Capers said: “Today’s sentence is a reminder to all those entrusted to represent the interests of the public that they will be held accountable if they engage in criminal activity and violate that trust.”

advertisement | advertise on newsday

Bender and his attorney, Brian DeSesa of Bridgehampton, had asked that he be spared jail time.

But prosecutor Allen Bode asked that Bender be sentenced to as much as 37 months — the top of the sentencing range under federal guidelines.

“Taking cash for drugs is greedy, not addictive,” Bode said.

In explaining the 2-year sentence, the judge cited Bender’s otherwise “very good” history and character.

“But for an elected official, getting involved in something like this is outrageous,” Spatt said. “... You violated your oath.”

Bender declined to comment afterward. DeSesa called the sentence “disappointing.”

Bode said Bender’s drug sales, uncovered by the Drug Enforcement Administration’s Long Island Drug Task Force, continued from 2012 to 2015.At the time of his arrest, Bender, a member of the Independence Party, was serving half of a four-year term that began in 2014.

Vince Taldone, who succeeded Bender as head of the Flanders, Riverside and Northampton Community Association and now sits on its board, was present in the courtroom.Afterward, Taldone said Bender’s sentencing was “very heartbreaking,” but the result of a “terrible mistake.”

Bender has said his supplier of pills was Michael Troyan, a physician assistant from Riverhead.Troyan pleaded guilty to conspiracy last week in federal court and is awaiting sentencing.