Utah Code Ann. § 77-15-4
The court in which a charge is pending may raise the issue of the defendant's competency at any time. If raised by the court, counsel for each party shall be permitted to address the issue of competency.