By filing a motion for judgment on the pleadings, relator admitted, for purposes of the motion, the truth of all relevant and well-pleaded allegations in the answer. In sustaining that motion, the court below neees-*7sarily viewed the answer in the same light. Vest v. Kramer (1952), 158 Ohio St. 78, 107 N. E. 2d 105; see, also, Ornella v. Robertson (1968), 14 Ohio St. 2d 144, 237 N. E. 2d 140; Ex parte Province (1933), 127 Ohio St. 333, 188 N. E. 550; State, ex rel. Turner, v. Bremen (1927), 117 Ohio St. 186, 158 N. E. 6.
In their answer, respondents alleged that “Richland Connty, Ohio is operating at its maximum debt limit and that they are without funds sufficient to provide a juvenile detention home or provide for its maintenance and operation.”
By admitting the truth of this allegation, for purposes of the motion for judgment on the pleadings, relator squarely placed before the court below the question of whether that averment stated a good defense to the complaint.
The complaint is based substantially upon the provisions of R. C. 2151.34, which provides, in part:
“Upon the advice and recommendation of the judge, the board of county commissioners sfhall provide, by purchase, lease, construction, or otherwise, a place to be known as a detention home, which shall be within a convenient distance of the Juvenile Court, and not used for the confinement of adult persons charged with criminal offenses, where delinquent, unruly, dependent, neglected children, or juvenile traffic offenders may be detained until final disposition. Upon the joint advice and recommendation of the juvenile judges of two or more adjoining or neighboring counties, the boards of county commissioners of such counties shall form themselves into a joint board, and proceed to organize a district for the establishment and support of a detention home for the use of the Juvenile Courts of such counties, where delinquent, unruly, dependent, neglected children, or juvenile traffic offenders may be detained until final disposition, by using a site or buildings already established in one such county, or by providing for the purchase of a site and the erection of the necessary buildings thereon. Such county or district detention home shall be maintained *8as provided in Sections 2151.01 to 2151.54, inclusive, of the Revised Code. * * *” (Emphasis added.)
Whether the “advice and recommendation” is for a county detention home or for a district detention home, it is apparent that an action in mandamus could lie if the board or boards fail to comply with the request.
In State, ex rel. Brown, v. Bd. of County Commrs. (1970), 21 Ohio St. 2d 62, 255 N. E. 2d 244, we considered a problem similar to the one presented here. In that case, relator, as attorney general, sought to compel respondent Board of County Commissioners of Franklin County to appropriate certain funds for public welfare under Chapters 5105, 5106, 5107, 5113 and 5151, Revised Code. It was apparent that there was a duty to appropriate the money requested, but respondent argued that the funds simply were not available. There, we said:
“The writ of mandamus is a high prerogative writ which does not lie if performance of the act prayed for is impossible; and in an action for a writ of mandamus under Section 5101.161, Revised Code, against a board of county commissioners commanding the members thereof to appropriate funds to provide for the deficit in the Public Assistance Fund for 1968, where the agreed statement of facts discloses that there is not enough money available for respondent to provide for such deficit and to provide also for the operation of all county offices without curtailing operation of such offices to the extent that it would be impossible for them to perform their statutory duties, thereby seeking to require respondent to perform acts which are impossible to perform because of lack of funds, the writ will be denied.” (Emphasis added.)
We reach the same result here. Impossibility of performance is a viable defense to a complaint for mandamus. It would be impossible for the Board of County Commissioners of Richland County to comply with the writ if, in fact, no funds are available within the guidelines enunciated in Brown.
The motion for judgment on the pleadings should have *9been overruled and evidence should have been taken. Therefore, the judgment of the Court of Appeals is reversed and the cause is remanded for further proceedings.
Judgment reversed.
0 ’Neill, C. J., Schneider, HeebeRt, Corrigan, Steen and Leach, JJ.., concur. Brown, J., not participating.