Former U.S. Rep. Anthony Weiner exits the Southern District courthouse on May 19 with attorney Arlo Devlin-Brown. Reuters/Brendan McDermid
Former Congressman Anthony Weiner leaves federal court in Manhattan following his sentencing Monday. AP/Mark Lennihan

A federal judge sentenced former U.S. Rep. Anthony Weiner, D-New York, to 21 months in prison on Monday for sending obscene material to a 15-year-old female, a scandal with repercussions that may have affected the outcome of the 2016 presidential race.

Weiner, 53, wept after U.S. District Judge Denise Cote of the Southern District of New York handed down the sentence. He had faced up to 10 years for one count of transferring obscene material and argued that he should receive probation.

“This is a serious crime that deserves serious punishment,” Cote said.

As part of a plea agreement he entered in May, Weiner cannot appeal the sentence. He must surrender on Nov. 6.

Assistant U.S. attorneys Amanda Kramer and Stephanie Lake prosecuted the case. Covington & Burling partner Arlo Devlin-Brown and Erin Monju, an associate with the firm, appeared for Weiner.

In a statement, Devlin-Brown said that Cote reasoned that, given Weiner’s notoriety, giving him prison time could discourage others “from following in his footsteps.”

“We certainly hope this public service message is received, but it has resulted in a punishment more severe than it had to be given the unusual facts and circumstances of this case,” Devlin-Brown said.

The sentence is the latest phase in Weiner’s long fall from grace. He had a once-promising political career, representing portions of Brooklyn in Congress for 12 years before resigning in 2011 amid a sexting scandal.

In 2013, he made a run for New York City mayor, and at times led the polls in the seven-way race for the Democratic nomination. But he was brought low again after it was revealed that he continued sending lewd material to women, and ended up getting about 5 percent of the vote.

Weiner dipped his toe back into politics a few years later, appearing as a political commentator on NY1 and writing columns for the New York Daily News.

But in January 2016, a 15-year-old female reached out to Weiner via direct message on Twitter and, over the next two months, they kept in contact through Skype and other messaging apps.

During these chats, the victim told Weiner her age. The scandal became public in September 2016 when the victim sold her story to the Daily Mail for $30,000.

The 2016 presidential race was in full swing at the time and Weiner’s wife, Huma Abedin, was serving as a top aide to Hillary Clinton. FBI agents investigating if Weiner had sent explicit messages to minors seized his computer and found emails that Clinton had sent and received while she was secretary of state.

This prompted then-FBI director James Comey to tell Congress just before the election that agents found emails that may have been related to a closed investigation into Clinton’s use of a private email server for official business, which some analysts believe hurt Clinton’s standing in the polls.

In papers arguing for probation, Weiner argued that his victim reached out to him with the intent of affecting the presidential race.

But in arguing in support for giving Weiner prison time, prosecutors said that Weiner’s behavior seemed to follow a particular—and repetitive—pattern: he initially denies his conduct, suffers personal and professional consequences, publicly apologizes then claims to have been reformed.