MEMORANDUM **
California state prisoner Enrique Mendoza appeals the district court’s denial of his 28 U.S.C. § 2254 habeas petition. Mendoza argues that the state trial court violated his due process rights by fading to conduct a competency hearing before accepting Mendoza’s guilty plea. We have jurisdiction pursuant to 28 U.S.C. §§ 1291 and 2253, and we affirm.1
We review the denial of a habeas petition de novo. Alcala v. Woodford, 334 F.3d 862, 868 (9th Cir.2003). Mendoza’s petition is governed by the Antiterrorism and Effective Death Penalty Act, which bars a federal court from granting habeas relief unless the state court’s adjudication on the merits resulted in a decision that was either (1) contrary to, or involved an unreasonable application of, clearly established federal law, as determined by the United States Supreme Court or (2) based on an unreasonable determination of the facts in light of the evidence presented to the state court. 28 U.S.C. § 2254(d).
Under the Supreme Court’s decision in Pate v. Robinson, a state court must follow adequate procedures to protect against the conviction of a criminal defendant who is incompetent to stand trial. 383 U.S. 375, 386, 86 S.Ct. 836, 15 L.Ed.2d 815 (1966). Due process requires a state court to hold a hearing where evidence before the court — including circumstances such as the defendant’s irrational behavior, his demeanor at trial, and any prior medical opinion regarding his competency — indicates a need for further inquiry into the defendant’s competency. Drope v. Missouri, 420 U.S. 162, 180, 95 S.Ct. 896, 43 L.Ed.2d 103 (1975). The test for competency asks whether the defendant has “sufficient present ability to consult with his lawyer with a reasonable degree of rational understanding — and whether he has a rational as well as factual understanding of the proceedings against him.” Dusky v. United States, 362 U.S. 402, 402, 80 S.Ct. 788, 4 L.Ed.2d 824 (1960).
Here, Mendoza asserts that he was entitled to a competency hearing because he told the trial judge that he was hearing “voices from witchcraft.” However, a subsequent colloquy with the judge revealed that Mendoza understood the nature of the charges against him, understood the role of the prosecutor and jury, and was able to communicate with his lawyer. Thus, the trial judge’s determination that a competency hearing was not warranted was neither contrary to, nor an unreasonable application of, clearly established federal law. The trial court’s decision also was not *802based on an unreasonable determination of the facts.
Accordingly, the district court’s denial of Mendoza’s petition for a writ of habeas corpus is AFFIRMED.
This disposition is not appropriate for publication and may not be cited to or by the courts of this circuit except as provided by Ninth Circuit Rule 36-3.
. Because the parties are familiar with the facts of the case, we reference them only as necessary to explain our decision.