Former Democratic Congressman Anthony Weiner exits federal court in Manhattan after pleading guilty in sexting case on May 19, 2017 in New York City.

Former U.S. Rep. Anthony Weiner cried in court as he apologizes to the 15-year-old girl with whom he exchanged sexually explicit texts.

The judge accepted Weiner's guilty plea Friday to a charge of transmitting sexual material to a minor. He agreed to not appeal any sentence between 21 and 27 months in prison.