Madonna and Guy Ritchie are working on a secret settlement over the custody of their son Rocco.
The former couple were urged by a judge last week to reach an "amicable" decision in the best interests of the 15 year old, so they have been hashing out a deal that could see the teenager spend the school year with the singer in the US and the holidays with the filmmaker in London.
A source close to Madonna said: "She is not going to give up on this until she gets her way.
"They are arranging a custody agreement right now between them that will satisfy both Madonna and Guy, as well as Rocco.
"The arrangement that they are working on will give both parents time with Rocco, but in monthly allotments.
"In their mediation, they decided that it would be best to have Rocco stay with his mother for the school year and live with Guy for holidays and summers."
The pair are both keen to agree a deal away from the court room following a High Court hearing in London last week, which came after a New York court ruled that Rocco should stay in London with his father for the meantime so he can attend their chosen school.
The source added to Radar Online: "Madonna and Guy both want a decision to be made quietly, and they will not put it out in the media that they resolved it.
"But by the next court date, everything will be settled and everyone will be content.".
This latest news comes after reports suggested the 57-year-old star had accepted the youngster - who left her 'Rebel Heart' tour in December to be with his dad and defied a court order to return to the US for Christmas - wouldn't be living with her anymore, which left her "bereft".
A source recently said: "The fact is Madonna has now accepted Rocco isn't coming home and that his home is now with his dad. Rocco wants to be with his dad but she won't give up being his mother.
"She won't stop fighting to try to make sure Rocco is kept safe and has what he needs. She can't understand why it has come to this. Her world has been shattered."
Madonna is also said to want the agreement between her and 47-year-old filmmaker Guy to be thrashed out in the US rather than the UK, as parents retain greater control over their kids until they are 18, whereas in Britain 16 year olds are given more freedoms.
- Bang! Showbiz