OPINION
Opinion by
Calvin Ray Cash filed a petition for writ of mandamus with this Court December 30, 2002. In the petition, Cаsh asks us to direct the respondent, the Honorable Robert E. Newsom, Judge of the 8th Judicial District Court of Hopkins County, Texas, to set a date for ruling on Cash’s motion for DNA (deoxyribonucleic acid) testing under Chapter 64 of the Texas Code of Criminal Procedure. On January 7, 2003, we requested the respondent to file a response to Cash’s petition. The response was to have been submitted by January 17, 2003. As of the date of this opinion, the respondent has not filed a response.
Cash’s petition indicates he is currently imprisoned in the Institutional Division of the Texas Department of Criminal Justice for three felony convictions from Hopkins County. The petition also states that Cash has filed a motion for DNA testing, but that as of Deсember 30, 2002, the trial court has not formally ruled on the motion.
Our power to issue writs of mandamus is not of constitutional origin, but is instead a creature of statute.
A & T Consultants, Inc. v. Sharp,
(a) Each court of appeals or a justice of a court of appeals may issue a writ of mandamus and all other writs necessary to enforce the jurisdiction of the court.
(b) Each court of aрpeals for a court of appeals district may issue all writs of mandamus, аgreeable to the principles of law regulating those writs, against a:
(1) judge of a district or county court in the court of appeals district; or
*288 (2) judge of а district court who is acting as a magistrate at a court of inquiry under Chapter 52, Cоde of Criminal Procedure, in the court of appeals district.
Tex. Gov’t Codе Ann. § 22.221(a), (b) (Vernon Supp.2003). Cash’s petition seeks relief against a district court judge. Accordingly, we have jurisdiction to consider the merits of his petition.
To be entitled to mandamus relief, the relator must demonstrate (1) that no other adequatе remedy at law exists, and (2) that under the law and facts relevant to the case, the act sought to be compelled is purely ministerial.
In re Rodriguez,
A triаl court must consider and rule on a motion brought to the court’s attention within a rеasonable amount of time.
In re Bonds,
In the instant matter, the record before us suggests the trial court has not acted on Cash’s motion in the almost five months since it was filed. This failure to act constitutes an abuse of discretion bеcause the trial court has a ministerial duty to enter a ruling within a reasonablе time. For this reason, we conditionally grant the petition for writ of mandamus.
First, if the relator has filed a request for appointment of counsel, we order the respondent to determine whether the relator is indigent and, if the relator is indigеnt, to immediately appoint counsel for the relator. See Tex.Code CRiM. PROC. Ann. art. 64.01(c) (Vernon Supp.2003). Second, we direct the respondent to rule on the relator’s motion for DNA testing. We are confident the respondent will comply promptly. The writ will issue only if the respondent fails to comply with this opinion.
