
672 P.2d 249 (1983)
105 Idaho 681
STATE of Idaho, Plaintiff-Respondent,
v.
David Leo ROSSI, Defendant-Appellant.
No. 14265.
Court of Appeals of Idaho.
November 10, 1983.
Kathleen R. Epeldi, Twin Falls, for defendant-appellant.
Jim Jones, Atty. Gen., Lynn E. Thomas, Sol. Gen., Leslie L. Goddard, Deputy Atty. Gen., Boise, for plaintiff-respondent.
TOWLES, Judge, Pro Tem.
As a result of plea negotiations, David Rossi pled guilty to one count of robbery, one count of aggravated battery, and to burglary in the first degree. He was sentenced to indeterminate terms not to exceed thirty years for the robbery and fifteen years for aggravated battery, to run concurrently. Because the burglary charge and the robbery charge involved the same basic facts, the court dismissed the burglary charge to avoid double punishment.
The sole issue on appeal is whether the trial court abused its discretion in sentencing *250 Rossi to an indeterminate thirty-year term for robbery in light of the state's recommendation that a fifteen-year indeterminate sentence be imposed. We affirm the sentence.
Early in the morning of February 5, 1981, Rossi and a companion broke into the home of a 78-year old widow. They robbed her and severely beat her to the point of semiconsciousness. Her home was damaged and her possessions were strewn about. After the attack, the victim was hospitalized and although she recovered physically from the incident, she became unable to care for herself and was moved into a nursing home. Because of her diminishing capacity, her ability to testify coherently was reduced, resulting in the state's subsequent participation in plea negotiations.
After the robbery, Rossi's companion talked to the police. He implicated Rossi. The companion pled guilty to robbery and received a five-year sentence. Rossi's prior record, including one felony and numerous misdemeanor convictions, outlined a long pattern of antisocial behavior. The trial court indicated that the viciousness of the crime required a severe punishment.
Rossi could have been sentenced to life for the robbery conviction. I.C. § 18-6503. A sentence within the statutory maximum will not be set aside absent a clear abuse of discretion. State v. Toohill, 103 Idaho 565, 650 P.2d 707 (Ct.App. 1982). The question is whether the duration of confinement is reasonable. See Heck v. State, 103 Idaho 648, 651 P.2d 582 (Ct.App. 1982). For this purpose, Rossi's term of confinement for robbery will be at least ten years. See I.C. § 20-223. "[A] term of confinement is reasonable to the extent it appears necessary, at the time of sentencing, to accomplish the primary objective of protecting society and to achieve any or all of the related goals of deterrence, rehabilitation or retribution applicable to a given case." State v. Toohill, 103 Idaho at 568, 650 P.2d at 710. In light of the nature of the crime and the facts surrounding its commission, we believe the trial court's sentence was reasonable.
Rossi also contends that the trial court abused its discretion by imposing a sentence twice that recommended by the state. We disagree. Idaho Code § 19-2513 states "the court shall ... sentence such offender to the custody of the state board of correction for an indeterminate period of time... ." The ultimate decision on the length of a sentence is therefore the province of the trial court. Our Supreme Court has considered the question of whether a jury's recommendation for leniency is binding on the trial court. It held that "[a] recommendation for leniency, though entitled to great consideration, is not binding on the court, and may be disregarded, or regarded by it as surplusage." State v. Farnsworth, 51 Idaho 768, 781, 10 P.2d 295, 300 (1932). The court in State v. Scrivner, 66 Idaho 498, 162 P.2d 897 (1945), held that no prejudicial error resulted from a court's refusal to follow the recommendation of the jury. We hold that a trial court is also not bound by a sentence recommendation made by the state even though that recommendation was offered in conjunction with a negotiated plea. The state's recommendation to the trial court is purely advisory. The sentence is affirmed.
WALTERS, C.J., and SWANSTROM, J., concur.
