"Teen Mom 2" star Leah Messer has reportedly lost primary custody of her twins after a long, drawn-out custody battle with her first ex-husband Corey Simms, In Touch reported. Simms fought for custody after Messer returned from a month-long stint in rehab, and he now has primary custody of 5-year-old girls Ali and Aleeah.

Simms was "awarded primary custody, effective immediately," on Oct. 13, a source told In Touch. "Leah only gets the girls on the weekends now."

The former couple's problems were documented on season six of MTV's "Teen Mom 2" when Simms first filed for custody. A judge ruled in Messer's favor in one episode when she voluntarily took and passed a five-panel drug test, as previously reported by HNGN.

In another episode, Messer left the girls with Simms for 30 days while she sought treatment at a rehabilitation center, and Simms said that he would fight for custody again.

Messer's divorce from her second ex-husband, Jeremy Calvert, was also documented on the show. Now that Messer lost custody of her oldest daughters, sources say that Calvert may look into gaining primary of the former couple's daughter, 2-year-old Addie.

"If [Jeremy] can find [a job] nearby, he'll go for the same custody arrangement that Corey did," the source said.

Messer may have hinted at the switch in custody for her twins on Twitter over the weekend, which would have been her first weekend with the girls since the custody arrangement was placed.

"There's nothing like actually having actual QUALITY time with my girls, for once," the mom of three wrote on Twitter. "We aren't running around to apts but INSTEAD . . We are having a fun filled weekend together l. ENJOYING each other as a family. At the end of the day that's what matters most ! #memories"

See her tweets below.