OPINION OF THE COURT
Balletta, J.This appeal arises out of the refusal by the Nassau County Department of Social Services (hereinafter the Department) to release the petitioner mother’s 2 ti-year-old daughter to her on the basis of a voluntary placement agreement which the petitioner had signed. The petitioner claims that continued custody of the child by the Department is unlawful since she has revoked the voluntary agreement by written request pursuant to Social Services Law § 384-a (2) (a). The issue that must be resolved is whether Social Services Law § 384-a (2) (a) empowers the Department to deny the written request of a parent for a child’s return when that parent had earlier signed a voluntary placement agreement which provided in part that the child would be returned "when [the] Commissioner [of Social Services] sees fit”.
The instant case had its origins in a neglect petition pursuant to Family Court Act article 10 which was brought by the Department some time towards the end of December 1988. After a hearing, and upon the consent of the petitioner, *32among others, the Family Court, Nassau County (Capilli, J.), issued an order dated February 1, 1989, finding that the child was neglected. However, the child was placed in the legal and physical custody of the petitioner pending a dispositional hearing, which had not yet been held as of the date this appeal was argued.
Subsequently, on April 26, 1989, the petitioner signed a voluntary placement agreement with the Department due to the fact that she was being hospitalized. The agreement read in part as follows:
"I * * * voluntarily transfer the care and custody of my * * * child to the Commissioner of Social Services under the following conditions:
"Until_, or (Specify date upon which child is to be returned)
"Until when [the] Commissioner [of Social Services] sees fit (Specify circumstances under which child is to be returned) _, or indefinitely, until I * * * notify the Commissioner in writing that I * * * revoke this instrument and request that the child be returned.
"I * * * understand that if a specific date or event is established for the return of the child, he (she) shall be returned by that date or upon the occurrence of that event unless such return is contrary to a court order entered prior to such date or within ten days thereafter. * * * If this consent is for an indefinite period, I * * * understand that upon our written request for the child’s return, he (she) shall be returned to me * * * within 20 days unless such return is contrary to a court order entered at any time prior to the expiration of the 20-day period.
"In the event that the Commissioner of Social Services fails to return the child within the specified time, I * * * understand that I * * * have a right to seek the immediate return of the child in either Family Court or Supreme Court.”
Of particular importance is the phrase "when [the] Commissioner [of Social Services] sees fit” which had been filled in on the line of the agreement for specifying the circumstances under which the child was to be returned.
Approximately three weeks later, the petitioner sent a letter (dated May 15 and received May 17) to the Department, requesting the "immediate return of [her] daughter to [her] custody” and purportedly revoking the voluntary placement of her daughter with the Department.
*33On June 7, 1989, the Department filed a petition for modification of the February 1, 1989, order. The petition noted that the order had given physical and legal custody of the infant to the petitioner, but that the petitioner had voluntarily placed the child with the Department on April 26 because she was entering a psychiatric facility due to her emotional instability. As a result of this alleged change in circumstances, the Department claimed that the order should be modified so that custody of the infant would be granted to the Department. Although the parties did not indicate how this petition for the modification of the order was resolved, it appears that no modification was ever made.
Shortly thereafter, i.e., on or about June 12, 1989, the petitioner sought a writ of habeas corpus, alleging that her child was being illegally detained in contravention of Social Services Law §§ 358-a and 384-a. The petition alleged that the petitioner had initially voluntarily placed her child with the Department due to her hospitalization. The petition further alleged that the petitioner had submitted a written request for the return of her child, but that she had not received any formal response from the Department. The petition alleged that on June 5, 1989, the petitioner appeared at the Department to determine whether her child would be returned to her. However, no definite date was set for the child’s return.
The petitioner argued that the child had been placed in temporary voluntary placement without a definite release date. Under Social Services Law § 384-a (2) (a), within 20 days of written request, the Department is required to return any child to a parent who voluntarily placed the child into the temporary care and custody of the Department with no definite date of return. The Department may refuse to release the child only if a contrary court order exists. Thus, it was argued, since the Department had not returned the child nor obtained a contrary court order, it was holding the child in violation of Social Services Law § 384-a (2) (a).
Moreover, the petition continued, the facts did not support continued placement of the child in foster care under the standards enunciated in Social Services Law § 358-a. Until the recent events, the child had continuously resided with her mother except for two brief periods in November 1987 and November 1988 when the child was in foster care. The petition explained that the mother was currently residing at Bethany House, a women’s shelter with accommodations for *34young children. The Department was said to be assisting her in finding permanent housing, and she was regularly attending counseling at the Long Beach Mental Health Clinic as well as receiving the assistance of an intensive case management worker from the Nassau County Department of Mental Health. The petitioner contended that the Department had failed to comply with the provisions of Social Services Law § 358-a, which require applications for the approval of the voluntary placement agreements to be filed no later than 30 days following the removal of the child from the home.
The court issued the writ returnable June 15, 1989. On the return date the parties appeared, oral argument was had and the court reserved decision.
By judgment entered July 17, 1989, the Family Court, Nassau County, dismissed the writ, reasoning that the voluntary agreement was one which provided that the Department would return the child upon the occurrence of an identifiable event, specifically "when [the] Commissioner [of Social Services] sees fit”. Accordingly, the intent of the agreement was that the child would be returned only when the Department deemed it in the best interests of the child. The court concluded that in light of the neglect proceeding, the Department clearly did not deem it in the child’s best interests to be returned to the mother at that time, and that it "may not alter that provision of the agreement entered into between [the] two parties”.
We are of the opinion that the Department has violated both the purpose and the procedural requirements of the Social Services Law in this case, and that the Family Court erred in failing to direct the Department to return the child to the petitioner.
At the outset it should be pointed out that the purpose of Social Services Law § 384-a, which contains the provision for voluntary placement agreements, is to "provide temporary assistance to parents who are experiencing some difficulty with the custody of the child” (Matter of Mehl, 114 Misc 2d 55, 60 [emphasis added]). The statute was not intended to be a means by which a parent could be permanently deprived of custody of a child at the whim or caprice of the Department. As the Appellate Division, Fourth Department, has explained, the main goal of the statute "is to protect parents voluntarily surrendering an infant for an indeterminate term and to assure them of the infant’s prompt return once consent is *35revoked. It is not for the agency to override the mother’s wishes for return of her child. There must be an appropriate court determination before the child may be withheld by the agency against the parent’s wishes” (Matter of Lee, 70 AD2d 775, 776).
In furtherance of this purpose, Social Services Law § 384-a (2) (a) allows for two types of voluntary placement agreements: those which provide that the child shall be returned upon a specific date or the occurrence of an "identifiable event” and those which do not specify when the child is to be returned (see, Matter of Mehl, supra, at 57). Social Services Law § 384-a (2) (a) states that where the instrument is of the former type, the Department must return the child at the specified date or event "unless such action would be contrary to court order entered at any time prior to such date or event or within ten days thereafter” or unless the parent is unavailable or incapacitated to receive the child. In such cases, the Department has the discretion to return the child earlier if requested by the parent. More importantly, Social Services Law § 384-a (2) (a) goes on to state: "If the instrument fails to specify a date or identifiable event upon which such agency shall return such child, such agency shall return the child within twenty days after having received notice that the parent or guardian wishes the child returned, unless such action would be contrary to court order entered at any time prior to the expiration of such twenty day period”.
The statutory language is clear and unequivocal. When the agreement fails to specify a date or an identifiable event for the return of the child, the child must be returned to the parent upon request unless there is a court order barring the return. In the event an agency fails to return the child under such circumstances, the courts have not hesitated to direct the agency to return the child to the parent (see, Matter of Wood, 94 Misc 2d 964; Matter of Mehl, 114 Misc 2d 55, supra). In the present case, the question is whether the voluntary placement agreement signed by the petitioner is of the “indefinite” type which would require that the child be returned upon request.
With respect to answering this question the case law is not particularly helpful. Apparently, no court has been asked to define what the phrase "identifiable event” means. The actual language employed in the agreement herein is ambiguous since it merely states that the child will be returned "when [the] Commissioner [of Social Services] sees fit”. The petitioner and Law Guardian each argue that such language leaves the *36matter entirely within the discretion of the Department and, as such, the date of the child’s return is not identifiable. The Department counters that while the event which occasions the child’s return may not be objectively identifiable, it nevertheless is identifiable; in addition, if the parties had intended that the duration of placement be indefinite, then the form would have been left blank, making that fact clear.
As noted before, the purpose of the statute is to provide parents with temporary assistance in caring for their child, while at the same time assuring them that the child will be returned promptly upon request. The statute is not intended to give agencies a vehicle to obtain custody over children indefinitely over the objection of the parents (see, Matter of Mehl, 114 Misc 2d 55, supra).
Thus, the use of the qualifying term "identifiable” in the statute appears to be a means of restricting the authority of the agency and safeguarding the interests of the parents. For when the event or date that the child is to be returned is indefinite, or in other words, not identifiable, the statute declares that the agency must comply with any written request for the child’s return within 20 days, unless there is a contrary court order. But when the event is considered identifiable, the statutory implication is that it is unnecessary for such a restriction on the agency’s authority, and that the parent’s interests are sufficiently safeguarded merely by requiring that the agency return the child upon the occurrence of the identifiable event.
Although there is no case law on point, it appears that the language employed here must be deemed to render the agreement one which places the child in the Department’s custody for an indefinite period of time. It is obvious that "when [the] Commissioner [of Social Services] sees fit” to return the child is an event which depends entirely upon the discretion of the Department. Interpreting that language to make this agreement one which specifies an identifiable event, as the Department argues, would have the effect of eliminating virtually any restriction on when the Department could return the child, regardless of the wishes of the mother. Such an interpretation would defeat the entire purpose of the statute and, therefore, it must be rejected.
The Department’s argument that the agreement should not be considered the indefinite type for the reason that the parties would have simply left the form blank if that is what *37they intended, is meritless. It is quite possible that the petitioner simply did not adequately understand the significance of the cryptic phrase "when [the] Commissioner [of Social Services] sees fit”.
Indeed, it is for the very reason, among others, that the parties may not always understand the agreement, that the Social Services Law requires that the agency obtain court approval of voluntary placement agreements. Social Services Law § 358-a (1) (a) requires that whenever the agency expects the child will remain in its custody in excess of 30 days, as a result of such a voluntary placement agreement or certain other transfer instruments, it must petition the Family Court to approve the transfer instrument upon the determination, inter alia, that the transfer is "in the best interest of the child”. Social Services Law § 358-a (3) (a) provides that the Judge should approve the transfer instrument only if satisfied that the parent "executed such instrument knowingly and voluntarily” because he or she would be unable to make adequate provisions for the child, and that the requirements of Social Services Law § 384-a have been satisfied (see, Matter of Meena B., 107 Misc 2d 684 [denying a petition to approve a voluntary placement agreement because the parents subjectively believed they could care properly for the child and signed the agreement only in order to avoid an abuse petition being filed against them]). Before granting the petition, the Judge should also be satisfied that reasonable efforts were made to eliminate the need to remove the child from the home and that reasonable efforts were made to make it possible for the child to return prior to the initiation of the court proceeding.
It is notable that in the instant case, there evidently was never a court proceeding to approve the voluntary placement agreement. This lack of compliance with the statutory procedures, while perhaps not a sufficient reason in and of itself to compel the agency to release the child, does indicate a certain disregard for the parental rights of the petitioner herein.
Further, Social Services Law § 358-a (3) (b) provides that the order granting the petition approving the transfer instrument may include conditions requiring the agency to exercise diligent efforts to discharge the child from its care. On the basis of this statute, several courts have held, quite naturally, that they have wide discretion to grant or reject the petition seeking approval of the transfer instrument (see, Matter of Meena B., supra), as well as to modify the terms of the *38transfer instrument (see, Matter of John M., 71 AD2d 144; Matter of Sammy P., 132 Misc 2d 69; Matter of Allen, 88 Misc 2d 265; Matter of D. Children, 90 AD2d 348 [the Family Court lacked authority to appoint a guardian ad litem once it had approved the transfer agreement, at which point its jurisdiction ended until the court made a periodic review pursuant to Social Services Law § 392]).
Thus, the Family Court erred in remarking that it "may not alter that provision of the [voluntary placement] agreement entered into between [the] two parties”. Although the court was not technically ruling on a petition to approve the transfer instrument, its order was in effect a decision based to some degree upon the validity of the agreement. It follows, therefore, that the court had the same discretion to disapprove the agreement as it would have had if it had been asked to approve the agreement at an earlier stage. In addition, Social Services Law § 384-a specifically provides that the parent may seek return of the child by a writ of habeas corpus. It is readily apparent, then, that the court had the discretion to reject or modify the transfer agreement and order that the child be returned.
Because the agreement was one calling for indefinite placement of the child, the Department was required to return the child within 20 days of receiving the written request. That 20-day period has passed and the Department has failed to return the child, despite the fact that no contrary court order has been obtained (see, e.g., Matter of Lillie Mae W., 116 AD2d 1026). Thus, the Department has violated both the purpose and the procedural requirements of the statute.
Accordingly, the judgment is reversed, the writ is sustained, and the respondent Nassau County Department of Social Services is directed to surrender custody of Anna N. to the petitioner forthwith.
Spatt, J. P., Sullivan and Harwood, JJ., concur.
Ordered that the judgment is reversed, on the law, without costs or disbursements, the writ is sustained, and the respondent Nassau County Department of Social Services is directed to surrender custody of Anna N. to the petitioner forthwith.