(CNN) -- U.S. Rep. Trey Radel was sentenced to a year of probation after pleading guilty Wednesday to misdemeanor cocaine possession -- a charge that authorities say came after he bought a small amount of cocaine in a sting in the nation's capital last month.
Radel, a 37-year-old first-term Republican from Florida, said at his sentencing in D.C. Superior Court that he plans to enter an inpatient drug treatment program in Naples, Florida. It wasn't immediately clear how long he would be in treatment.
The plea and sentence were part of a deal that Radel's attorney struck with federal prosecutors. He could have received a maximum sentence of 180 days imprisonment or a $1,000 fine, or both.
"Your honor, I apologize for what I've done," Radel told Judge Robert Tignor in court Wednesday. "I think in life I've hit a bottom where I realize I need help."
Radel said he was aggressively pursuing that help, with the support of friends and loved ones.
"I'm so sorry to be here," he continued, saying that he knew he'd let his constituents, his country and his family down and that he would work to recover and to be a better man. "I want to come out of this stronger," he said.
In a statement released earlier this week, Radel said he struggled with alcoholism, which led "to an extremely irresponsible choice."
He was charged after he bought 3.5 grams of cocaine from an undercover police officer in Washington's Dupont Circle area on October 29, court documents say.
It was a sting that stemmed from a broader FBI/Drug Enforcement Administration investigation of a drug trafficking organization in the nation's capital, law enforcement officials told CNN on condition of anonymity.
The targets of the investigation are dealers and high-level people in the organization, not buyers and users. But a dealer who was arrested last month told federal agents that one of his customers was a congressman, one of the law enforcement officials said.
So, deciding they couldn't turn away from that, agents set up the sting, the law enforcement officials said.
Court documents say Radel gave the undercover officer $260 for the cocaine outside a restaurant, and the two got into the officer's vehicle, where the officer gave Radel the cocaine.
Federal agents approached Radel after the left the vehicle, and Radel dropped the cocaine to the street, according to court documents.
Radel then agreed to talk to the agents in his apartment, where he admitted he bought cocaine, according to the documents. "The defendant also retrieved and provided to the agents a vial of cocaine that he had in his apartment," the court documents say.
A tea party favorite, Radel was elected last year to represent southwest Florida's 19th Congressional District.
He is a former journalist and TV news anchor, having worked for WINK in Fort Myers, Florida. He also owned and eventually sold the Naples Journal newspaper, according to a biography on his congressional website.
Radel is married with a young son. He is active on Twitter, where he posts about touring the Capitol, listening to hip-hop, playing guitar and opposing Obamacare.
In a statement released by his office this week, Radel said he was "profoundly sorry to let down my family, particularly my wife and son, and the people of Southwest Florida."
"I struggle with the disease of alcoholism, and this led to an extremely irresponsible choice," he said. "As the father of a young son and a husband to a loving wife, I need to get help so I can be a better man for both of them.
"However, this unfortunate event does have a positive side. It offers me an opportunity to seek treatment and counseling. I know I have a problem and will do whatever is necessary to overcome it, hopefully setting an example for others struggling with this disease."
A spokesman for House Speaker John Boehner said in a prepared statement this week that members of Congress "should be held to the highest standards, and the alleged crime will be handled by the courts."
"Beyond that, this is between Rep. Radel, his family, and his constituents," Boehner's spokesman said.