The nightmare is over for Amber Portwood.
The Teen Mom OG star, 25, has finally come to an agreement with ex Gary Shirley in their bitter custody battle, RadarOnline.com can exclusively report.
Portwood will now share 50/50 custody of daughter Leah, 6, with her former fiancé, MTV insiders told Radar.
"Amber and Gary finally worked everything out with their lawyers two weeks ago," a source close to Shirley, 29, revealed. "They're both happy."
The Indiana native, who lost Leah as she struggled with legal and substance abuse problems in 2011, has been fighing to regain rights to her daughter since her November 2013 release from confinement.
Portwood's struggle for her little girl will play out on the upcoming season of Teen Mom OG, which premieres on January 4.
"I shouldn't have to go through a custody battle for my kid!" Portwood sobs in the new trailer.
She claims to have more than three years clean from drugs, and has become one of the most stable mothers in the MTV franchise, with a best-selling memoir and college courses under her belt.
The doting mom is engaged to marry boyfriend of more than one year, Boston native Matt Baier, 44, next fall.