delivered the opinion of the court.
Being imprisoned in the municipal jail of Yanco, Delfín Rivera petitioned the District Court of Ponce for a writ of habeas corpus to obtain his release on the ground that he was unlawfully deprived of his liberty by a judgment rendered by the municipal court of the said town convicting him of aggravated assault and battery and sentencing him to pay a fine of sixty dollars or to imprisonment one day in jail for each dollar of the fine not paid, notwithstanding the fact that he had claimed the right to be tried by a jury in accordance with the Sixth Amendment to the Constitution of the United States.
The writ of habeas corpus having issued and the proper-formalities having been complied with, on November 14, 1917, the Ponce .court ruled on the petition as a certiorari proceeding, setting aside all the proceedings in the Municipal Court of Yanco since the order of said court denying the-right of the accused to be tried by a jury, and ordered that, the prisoner be immediately set at liberty in regard to serving the sentence imposed by the said municipal court, if he *162were not imprisoned for any other canse, any provisional bail given by the accused at the time the proceedings were begun - and prior to the rendition of judgment to remain in effect.
An appeal to this court was taken from the above decision.
Certiorari and habeas corpus are distinct in character, procedure and purpose, as is shown by the statutes governing them. The purpose of a writ of habeas corpus is only to obtain the release of a petitioner who is unlawfully imprisoned, and can never take the place of a writ of certiorari.
It was the duty of the District Court of Ponce to dispose of the question of law submitted for its decision and it was not authorized to change the nature of the remedy by habeas corpus by diverting it from its proper sphere in order to give it the character and effect of a writ of certiorari.
The decision appealed from is reversed and the court should dispose of the petition for a writ of habeas corpus submitted to its consideration in the proper manner.
Reversed and remanded.
Justices Wolf, del Toro, Aldrey and Hutchison concurred.