Michael Jackson's mother Katherine has been re-instated as guardian of his three children by a court in Los Angeles.
She will share custody with their cousin TJ, who was made temporary guardian last week after the 82-year-old was reported missing.
She had not had contact with her grandchildren for ten days, but was later found at a spa in Arizona.
A hearing on 22 August will decide if the arrangement will be made permanent.
Tito Jackson Jr, the 34-year-old son of Michael's brother Tito, stepped in as guardian for Prince Michael, 15, Paris, 14 and 10 year-old Blanket.
However, his lawyer Charles Shultz said he "in no way was trying to displace his grandmother" as "they respect each other".
Under the new agreement, TJ Jackson remains as co-guardian, with control over the staff and day-to-day operations of the family home.
Perry Sanders Jr, Katherine Jackson's lawyer, has said the arrangement will allow his client to focus on the children's upbringing and not on financial or logistics issues.
The co-guardianship arrangement would also allow either adult to serve as sole guardian if the other were no longer able to serve.
In a sworn statement, Katherine Jackson said: "I am, and have been, very close with my grandson TJ and have relied on him to help me raise Prince, Paris and Blanket since the death of their father.
"While I was away, I assumed that (the children) would be secure and safe in the hands of the person who had essentially been acting as an informal co-guardian on many matters with me since my appointment as guardian."
The Jackson family have been involved in legal and financial disputes since the singer's sudden death in June 2009.
His will left nothing to his siblings and last week several of them signed a letter claiming it was a fake, calling on executors of the estate to resign.
However Jermaine Jackson withdrew his support for the letter on Wednesday and issued a plea on Twitter for peace in the family.
He wrote that the family is still raw from Michael Jackson's death, and his mother has endured incredible stress and pressures since then.
Katherine Jackson returned to the family compound near Los Angeles last week after publicly denying rumours she had been kidnapped by some of her adult children.
She said she was unaware she had even been reported missing during her stay at the luxury spa in Tucson, Arizona last month, from where she said she was unable to communicate with the outside world.
Ms Jackson claims she was not allowed access to a phone or her iPad after being sent there following doctor's orders to rest, but was told that the kids were fine.
Court documents revealed that she had only learned she was the subject of a search when she accidentally heard a TV report.
"While there was a telephone in my room, the telephone was not functioning and I could not dial out," she said in the documents.
"In addition, there was no picture on the television in my room," she added, and said she had repeatedly asked to have the TV fixed.
"One morning I woke up to the sound of the television," she said. "While there was no picture, I heard a broadcast that stated I was missing."
'Bunch of lies'
Katherine Jackson made a statement to ABC News before she left Tucson, seated with her children Randy, Janet and Rebbie next to her, denying that she had been prevented from leaving.
"My children would never do a thing to me like that, holding me against my will," she said. "It's very stupid for people to think that."
She also said she was devastated she had lost guardianship of her grandchildren "based on a bunch of lies."
Superior Court Judge Mitchell Beckloff said an investigator who looked into the children's care found the late singer's mother was an excellent guardian and the children love her.
Michael Jackson died aged 50 from an overdose of the surgical anaesthetic propofol.
His former doctor Conrad Murray was jailed for four years in November, after being convicted of the singer's involuntary manslaughter.