Opinion
HASTINGS, J.Appellant Robert W. Stoker, Jr. (Robert) and respondent Laura Lee Stoker Kinney (Laura) were married on December 12, 1969, and had one child of said marriage namely Tammral Jean Stoker bom June 5, 1970. The parties separated off and on for about three years when Robert filed a petition for dissolution of marriage on March 26, 1973. In his petition he requested that the custody be awarded to Laura. Robert obtained a default interlocutory judgment of dissolution of marriage on October 29, 1973, which awarded custody of Tammral to Laura.
*880On November 13, 1973, a stipulation to modify the interlocutory judgment regarding child custody and support signed by both parties transferred custody of Tammral to Robert. Approximately two years later, Laura filed an order to show cause regarding modification of custody and the hearing we are concerned with here was held. Laura testified that prior to signing the stipulation she had received no help from Robert in the way of child support for several months. She stated that Robert had told her that she could support Tammral on her own but if she wanted his help in any way he would want full custody of the child. During part of this time Laura was on welfare. She did not have an attorney nor did she consult an attorney before signing the stipulation, because, as she testified, she could not afford one. Just prior to filing her request for modification, she had heard from Tammral during the child’s visitations with her, that Robert and his second wife were planning to move to Utah and to take Tammral with them. At the time of the modification hearing Laura had remarried and evidence was taken as to the living conditions in her home and the environment that would surround Tammral should the judge transfer custody back to her.
While testimony was being presented on behalf of Robert the court made the following statement to his counsel:
“The Court: You understand, counsel, that the Court’s position, or the Court’s feeling is that here’s a woman—unless therp’s rebuttal to her testimony—that he didn’t pay for the support of this youngster, that he made it impossible for her to maintain a home for the youngster, and that the transfer of custody was through coercion. And even though he’s maintained a perfectly stable, beautiful, loving, and warm home for this youngster for that two years, it’s been with unclean hands. And she’s entitled to a two-year period, and after she’s had her two-year period, if she wants to come back and ask the Court, then the parties will be equal.”
There is nothing else in the record to inform us of the court’s reason for awarding Laura custody, therefore, we accept the above statement as the full reason.1
*881Discussion
Robert argues that the lower court abused its discretion in awarding custody to Laura because its decision was not based upon the best interests of the child. He cites Civil Code section 4600 which in pertinent part provides: “Custody should be awarded ... (a) To either parent according to the best interests of the child.” And Ashwell v. Ashwell, 135 Cal.App.2d 211 [286 P.2d 983], where the court said at page 217: “[I]n determining where custody of children shall lie the courts are not engaged in a disciplinary action to punish parents for their shortcomings as individuals nor to reward the unoffending parent for any wrong suffered by the sins of the other.” Robert further relies on Cochran v. Cochran, 240 Cal.App.2d 418 [49 Cal.Rptr. 670], Here custody of two minor children had been vested in the mother by the interlocutory decree, after which, pursuant to a verbal agreement, custody was given over to the father to facilitate the mother’s education. Approximately one and one-half years after the interlocutory decree the father moved for modification of custody requesting exclusive custody in himself. The motion was granted and affirmed by this court which said: “In determining what is for the welfare and best interest, factors which must be considered are the desirability of maintaining a stable physical and emotional ambient, and the length of time that a child has been in the continuous actual, physical custody of the parent then having such custody.
“It is the actual custody that either serves or disserves the welfare and best interest of the children.”
Robert contends the trial court has awarded custody to Laura simply on the equitable doctrine of unclean hands. 2 In other words the trial court’s statement demonstrates that it was a showing an obvious concern, *882not for the child’s welfare,3 but for the punishment of Robert, an action contrary to the law spelled out above.
Disposition
While we have empathy with the trial court’s decision, we must agree with Robert that it erred in not awarding custody on the basis of what was best for Tammral. Clearly, this is the law. However, when the custody of a minor child is in issue, the trial court as well as this court is often faced with a problem worthy of Solomon, and only a mixture of law and equity can solve it. This is such a case.
There was substantial evidence in the record to sustain the trial court’s finding that Laura signed the custody stipulation under coercion. At the time of signing Laura had legal custody of Tammral, and the practical effect of the court’s order was to rescind the agreement and place the parties back in status quo.4 Had the court continued to take evidence and had then based its order changing custody on what was best for Tammral, we could have agreed with the court’s action. However, the court acted hastily and changed custody for the wrong reason. Because of this, we must remand the matter in order that the court can receive evidence on this issue and award custody consistent with proper findings. Pending the outcome of this additional hearing, temporary custody of Tammral shall remain with Laiira.5 Returning Tammral to Robert during the interim is not only unnecessary, but unwise. When this opinion becomes final, Tammral will have been with Laura for over a year and, in our opinion, another uprooting of her, pending the final decision, is not in her best interest (see Cochran v. Cochran, supra,. 240 Cal.App.2d 418). As stated earlier, the record discloses that Laura can furnish Tammral a stable home with a good environment. We are convinced the trial court would not have permitted transfer of custody if this were not true. However, our decision to permit Tammral to remain with Laura, at this time, does not mean we are prejudging the final *883determination of this issue in favor of Laura. The trial court must determine this issue de novo.
The judgment is reversed and the matter is remanded for further hearing consistent with this opinion.
Kaus, P. J., and Ashby, J., concurred.
The court at conclusion of the parties’ evidence further commented that its order was based on equitable principles. It said:
“THE COURT: I think it’s a lesson for lawyers, counsel. I’m sorry that most lawyers can’t hear what’s happening today. It’s a lesson for lawyers that, a wife under those drastic circumstances that cause this kind of long-term permanent damage perhaps to all the parties concerned, that no lawyer should allow a woman under these circumstances *881to give up custody without making sure that she has independent counsel representing her to explain to her her rights.
“MR. GRAHAM: Punish the lawyer, Your Honor, but don’t punish the child.
“THE COURT: I don’t believe I’m punishing the child, counsel.
“The Court is required to treat each of the parties equally. It’s a court of equity.
“I have to weigh the equities here, and the equities militate against your client. “Custody of the minor child is awarded to the respondent with right of reasonable visitation to the petitioner.”
The clean hands doctrine has been cited in child custody cases where one party has illegally removed a child from a jurisdiction in order to gain custody. However, the doctrine has never, to our knowledge, been used as the sole reason for transferring custody. The court first determines what is best for the child. (In re Walker, 228 Cal.App.2d 217, 223 [39 Cal.Rptr. 243].)
The statement (see fn. 1, supra) “I don’t believe I’m punishing the child” is just about the only indication that Tammral’s best interests were deemed compatible with the punitive nature of the order.
The trial court of course also erred by saying “and she’s [Laura] entitled to a two-year period, and after she’s had her two-year period, if he wants to come back and ask the court, then the parties will be equal.” Where there are changes of circumstances, a parent can always seek a child’s custody that is in the child’s best interest.
From a review of the record, we are satisfied that there were sufficient changes of circumstances in Laura’s life to enable the court to reopen the matter of custody.