03/21/2007 at 02:45 AM EDT
Britney Spears has finished her nearly one-month stint in rehab and has left the facility.
Spears "has been released by the Promises Malibu Treatment Center after successfully completing their program," her manager, Larry Rudolph, said in a statement late Tuesday night.
A friend says the 25-year-old pop star "is doing fine."
She voluntarily checked into Promises on Feb. 20 after a weekend of hard partying in which she shaved her head. She briefly
left the program
the next day – only to return when estranged husband Kevin Federline threatened a custody battle
over their two sons.
Since then, Spears has attended Alcoholics Anonymous meetings, though her one-month stay was shorter than most. A typical stint at Promises is about 45 days.
Federline, who was caring for the children while Spears was in rehab, wants to continue doing so for the time being, a source says.
"Kevin and his divorce attorney Mark Vincent Kaplan are very happy and cautiously focused on Britney's rehab follow-through," the source says. "Federline and Kaplan are not about to return custody to Britney as a reward for her going through Promises."
According to the source, Federline has taken the position that "Britney will have increased custody (after) demonstrating that she is living the life consistent with the best interest of her children."
Federline has visited her in rehab several times with their sons, most recently last weekend, and has been described as supportive of her recovery.
Others rooting for Spears's recovery include Brooke Shields, who told Access Hollywood
, amid speculation that Spears may be suffering from postpartum depression, that she'd be available to talk to the singer anytime.
And music producer Timbaland, who has crafted hits for Spears's ex-boyfriend, Justin Timberlake, told Entertainment Weekly
that he'd like to work with Spears once she's better.