Although a surprise witness is a common theme on TV and in movies, a surprise witness at a trial is rare. Generally, parties are required to disclose their witnesses before trial, and often courts do not allow surprise witnesses to testify. The idea is that prior to trial, all of the parties know generally what to expect so that they will not be prejudiced by a surprise.
The process of discovery is a pre-trial procedure in which the parties can obtain information from each other through different discovery tools. The goal of discovery is to uncover the evidence that will or could be used at trial. For that reason, during discovery, one party can require another party to identify the witnesses who have knowledge about the incident at issue, as well as the witnesses they plan to call at trial.
In New Mexico, a trial court has broad discretion to allow or bar witnesses whose identities were not revealed in pre-trial discovery. That is, if a party discloses the identity of a witness late, the trial court can decide whether to allow the late-disclosed witness to testify. This decision generally depends on the circumstances, and the court may choose to impose a less harsh sanction in some cases.