Seccia appeals from a final order dismissing his petition for writ of habeas corpus on the grounds that it was not filed by him, but by a friend on his behalf. We reverse.
This cause was initiated by the filing of a petition for writ of habeas corpus in the Circuit Court for the Eighth Judicial Circuit of Florida. Although this petition sought relief for Seccia, a Florida prison inmate, it was signed and apparently prepared by a fellow inmate, Robert Proeup, ostensibly as Seccia’s “next of friend.” By order dated 21 November 1984, the petition was dismissed by the trial court upon a finding that Procup lacked both the authority and standing to seek judicial relief for Seccia.
Historically, habeas corpus is a high prerogative writ. It is as old as the common law itself and is an integral part of our own democratic process. The procedure for the granting of a writ of habeas corpus should not be circumscribed by hard and fast rules or technicalities which often accompany the consideration by the court of other processes. If it appears to a court of competent jurisdiction that a person is being illegally restrained of his liberty, it is the responsibility of the court to brush *1157aside formal technicalities and issue such appropriate orders as will do justice. In habeas corpus the niceties of the procedure are not anywhere nearly as important as the determination of the ultimate question as to the legality of the restraint. Anglin v. Mayo, 88 So.2d 918 (Fla.1956). Florida courts should extend considerable latitude in pleading to a prisoner seeking the issuance of the writ of habeas corpus, give the petitioner the benefit of the doubt, and overlook technical inadequacies in his petition. Wood v. Cochran, 118 So.2d 193 (Fla.1960).
Moreover, the general rule is any person detained in custody, whether charged with a criminal offense or not, may prosecute a writ of habeas corpus to inquire into the cause of his imprisonment or restraint. Section 79.01, Florida Statutes. The application for the writ may be made by an agent, or friend, wife, or husband, or by a parent for his child, a guardian for his ward, or special bail for his principal. In any event, it must be a friendly person in the interest of the person illegally detained. State ex rel. Deeb v. Fabisinski, 111 Fla. 454, 152 So. 207 (1933), reh. den. 111 Fla. 451, 156 So. 261 (1933); Jamason v. State, 447 So.2d 892 (Fla. 4th DCA 1983). Accordingly, the trial court in the instant case erred in dismissing Seccia’s petition on the ground that it was filed by his “next of friend,” fellow inmate Procup, and we reverse.
SMITH and THOMPSON, JJ., concur.