Former Rep. Anthony Weiner pleaded guilty Friday to one count of transferring obscene material to a minor after he sexted a 15-year-old girl in North Carolina.

He is set to be sentenced September 8

He faces up to two years in prison. He also has to register as a sex offender.

Weiner's estranged wife Huma Abedin officially filed for divorce Friday.

The couple had been married for almost seven years, and have a five-year-old son.

During a federal investigation into Weiner, the FBI found emails on his laptop between Abedin and then-presidential candidate Hillary Clinton. Abedin was a top aide to Clinton.

As a result, the FBI briefly reopened it's probe into Clinton's private email server, a decision many people say swayed the election in Donald Trump's favor.