Petitioner Gary L. Foster was confined for civil contempt arising from his failure to pay child support, maintenance, and attorney fees as ordered in a divorce decree. On his petition, we issued a Writ of Habeas Corpus, which we made absolute, ordering petitioner’s discharged from confinement. We state our reasons in this opinion.
On August 2, 1984, a hearing was held on Dyan (Foster) Brooke’s motion to hold petitioner in contempt. At that hearing petitioner was ruled indigent and counsel was appointed to represent him. Thereafter, on the same day, a hearing was held and petitioner was adjudged in contempt of court for failure to make the payments as ordered in the decree. He was ordered confined until he purged himself of contempt by either payment of the full amount owed or presentation of a plan for payment of this amount.
This was an order of committment for civil contempt. Teefey v. Teefey, 533 S.W.2d 563, 566 (Mo. banc 1976). On imprisonment for civil contempt, the con-temnor in a sense has the key to his cell in his pocket, Brown v. Brown, 646 S.W.2d 888, 889 (Mo.App.1983); he can secure his release by purging himself of contempt in whatever manner is specified in the order. The contemnor must have the ability to purge himself of his contempt to justify imprisonment for civil contempt. Huber v. Huber, 649 S.W.2d 955, 958 (Mo.App.1983); Mechanic v. Gruensfelder, 461 S.W.2d 298, 304 (Mo.App.1970).
In the present matter, petitioner, who is unemployed and not overendowed with assets, was found to be indigent and a *271lawyer was appointed to represent him on the hearing on the motion to hold him in contempt. In habeas corpus the legality of the civil contemnor’s restraint may be considered insofar as that can be determined from the face of the record. Ex Parte Ryan, 607 S.W.2d 888, 892 (Mo.App.1980). Here the record shows that the indigency order was never set aside, and is thus in conflict with the recitation in the judgment of contempt that he has the ability to comply with the order, and with the stated means of purging his contempt, which was to pay the support arrearages or to present a plan for payment of the arrearages. In the face of the specific finding of indigency the committment for contempt cannot stand. The petition for Writ of Habeas Corpus is granted. The writ is issued, made absolute, and the petitioner is ordered discharged.
PUDLOWSKI and SIMON, JJ., concur.