Sentences shall be imposed without unreasonable delay, but not within forty-eight hours after determination of guilt. A defendant may waive the forty-eight hour delay. Before imposing a sentence, a court may order a hearing in mitigation or aggravation of punishment. If the defendant is a juvenile convicted as an adult of a Class A or Class B felony, prior to imposing a sentence, the court shall conduct a presentence hearing. At such hearing, the court shall allow the defense counsel an opportunity to speak on behalf of the defendant and shall address the defendant personally and ask him if he wishes to make a statement in his own behalf and to present any information in mitigation of punishment. The prosecuting attorney shall have an equivalent opportunity to speak to the court. The circumstances must be presented by the testimony of witnesses examined in open court, except that a witness' deposition may be taken by a magistrate in accordance with chapter 23A-12. In imposing a sentence, the court shall enter an order of restitution in accordance with chapter 23A-28.
SDCL 23A-27-1