
153 N.W.2d 147 (1967)
STATE of Minnesota ex rel. Richard O. MELDAHL, Appellant,
v.
Ralph H. TAHASH, Warden, Minnesota State Prison, Respondent.
No. 40533.
Supreme Court of Minnesota.
September 8, 1967.
C. Paul Jones, Public Defender, Ronald L. Haskvitz, Asst. Public Defender, Minneapolis, for appellant.
Douglas M. Head, Atty. Gen., Gerard W. Snell, Acting Sol. Gen., David C. Weinberg, Asst. Atty. Gen., St. Paul, for respondent.

OPINION
PER CURIAM.
On July 14, 1966, relator filed a petition in Washington County District Court for a writ of habeas corpus. In an order issued July 26 the court denied the petition without a hearing thereon. On August 17, 1966, relator appealed to this court from that order.
A brief review of the background of this case discloses that on June 1, 1962, relator, *148 who was then represented by court-appointed counsel, entered a plea of guilty in the District Court of Rice County to forgery in the second degree in violation of Minn. St.1961, § 620.10. On August 16, 1962, he was sentenced to the State Prison for a period not to exceed 5 years. On November 21, 1966, according to the files of the Department of Corrections, Adult Corrections Commission, relator was granted an unconditional discharge from custody of the respondent warden and was released under a detention order to authorities in the State of Iowa in connection with a matter in that state over which we have no jurisdiction.
It is a well established rule that the courts will decide only actual controversies and that when an event has occurred which renders it impossible for an appellate court to grant any effectual relief, it will dismiss the appeal. State ex rel. Lezer v. Tahash, 268 Minn. 571, 128 N.W.2d 708.
It is our opinion under the record here that inasmuch as relator has been unconditionally discharged from the custody of respondent warden and removed from the jurisdiction of the courts of this state since about November 21, 19666 months before this case was heard in our court on May 25, 1967the present appeal is moot.[1]
Generally, habeas corpus proceedings are designed to test the legality of the detention and the petitioner must be in custody for the writ to lie (with the exception noted in Jones v. Cunningham, 371 U.S. 236, 83 S.Ct. 373, 9 L.Ed.2d 285, 92 A.L.R. 2d 675).
Appeal dismissed.
NOTES
[1]  In that relator here was unconditionally discharged, this case differs materially from our recent decision in State ex rel. Atkinson v. Tahash, 274 Minn. 65, 142 N.W.2d 294. In that case we held that a state prisoner, released from a state institution and in custody of the Adult Corrections Commission under conditions imposed by that body and subject to revocation, is entitled to the remedy of habeas corpus as used under the practice in this state as a postconviction remedy. Such is not the situation here.
