
305 N.W.2d 390 (1981)
STATE of South Dakota, Plaintiff and Appellee,
v.
Leland RICH, Defendant and Appellant.
No. 13166.
Supreme Court of South Dakota.
Argued February 11, 1981.
Decided May 6, 1981.
Mark W. Barnett, Asst. Atty. Gen., Pierre, for plaintiff and appellee; Mark V. Meierhenry, Atty. Gen., Pierre, on brief.
*391 Joseph Neiles, Asst. Public Defender, Rapid City, for defendant and appellant; Steven D. Rich, Rapid City, on brief.
MORGAN, Justice.
The State had originally charged appellant Leland Rich (appellant) with first-degree rape in violation of SDCL 22-22-1(1). After negotiating a plea bargain, appellant pleaded guilty to a reduced charge of attempted first-degree rape in violation of SDCL 22-4-1 and SDCL 22-22-1(1). The trial court sentenced appellant to serve ten years at the South Dakota State Penitentiary in Sioux Falls, South Dakota. Appellant appealed from that sentence. We affirm.
Appellant was arrested pursuant to a complaint signed and filed against him, which alleged that he had violated SDCL 22-22-1(1), first-degree rape. Following a preliminary hearing, appellant was bound over to circuit court on the charge and arraigned on the information. At that time, appellant pleaded not guilty to the charge. Appellant later negotiated and signed a "Waiver of Rights and Plea," or plea bargain. The pertinent portions of the plea bargain were as follows:
I further acknowledge that being cognizant of the foregoing constitutional rights and after having an opportunity to discuss this matter and all possible available defenses with my attorney, I intend to enter a plea of guilty to the reduced charge of attempted rape under the terms of a plea bargain. The terms of the plea bargain, as I understand them, are as follows: In exchange for a plea of guilty to the reduced charge of attempted rape, the State will:
(1) Recommend a maximum sentence of five to six (5-6) years imprisonment in the State Penitentiary with credit for time already served in the Pennington County Jail, recommended to be applied on the beginning of such term of imprisonment,
(2) The State will not bring any other charges arising out of the incident charged in this matter,
(3) I will be permitted to present witnesses and testimony at a mitigation hearing prior to sentencing, and the State will not aggravate or present unfavorable testimony or comments,
....
... I understand that the Court is not bound by the terms of the plea bargain, but that this Court could impose a maximum sentence of twelve and one-half (12½) years or a find [sic] of twelve thousand five hundred dollars ($12,500.00), or both such fine and imprisonment.
Appellant was arraigned on and pleaded guilty to the amended information that charged him with attempted first-degree rape in violation of SDCL 22-4-1 and SDCL 22-22-1(1). Before accepting the plea, the trial court reiterated the terms of the plea bargain and questioned appellant as to the voluntariness of his plea. The trial court went on to say:
THE COURT: You do that, of course, knowing that the recommendation by the State does not have to be followed by the Court, that I have it in my power to sentence you to a maximum of twelve and a half years in the State Penitentiary and fine you in the sum of twelve thousand five hundred dollars?
THE DEFENDANT: Yes.
A mitigation hearing was held prior to sentencing. Before hearing testimony, the trial court informed appellant that "[y]ou have been advised that the maximum fine or sentence that may be imposed is a fine in the sum of $12,500 and a sentence in the Penitentiary for a term of twelve and a half years." The trial court reiterated the loss of rights and said:
THE COURT: Is it still your intention at this time to proceed with sentencing?
THE DEFENDANT: Yes.
THE COURT: Do you wish to stand on your plea of guilty?
THE DEFENDANT: Yes.
THE COURT: You don't wish to change your mind and proceed in another fashion at this time?
THE DEFENDANT: No.
THE COURT: You have still done this through counsel with Mr. Hurley and you have had the benefit of discussions with *392 him about these proceedings; is that right?
THE DEFENDANT: Yes, I have.
THE COURT: Mr. Hurley, do you feel that it is your understanding from Mr. Rich that he still wishes to proceed at this time?
MR. HURLEY: Yes, sir.
THE COURT: Mr. Churchwell, do you have anything for the record at this point?
MR. CHURCHWELL: State has nothing, Your Honor.
THE COURT: The other thing I should mention, Mr. Rich, it is my understanding that the State has a specific recommendation in this case in exchange for the plea of guilty for a certain term of years.
Is that right?
MR. CHURCHWELL: Yes.
THE COURT: And that is not to exceed
MR. CHURCHWELL: Not to exceed five or six years.
THE COURT: Do you still understand that I am not bound by that statement by the State?
THE DEFENDANT: Yes.
THE COURT: That is, the sentence is still in my sole discretion.
THE DEFENDANT: Yes.
THE COURT: And it is still your intention to proceed?
THE DEFENDANT: Yes.
The trial court then heard testimony at the mitigation hearing, after which it sentenced appellant to ten years at the state penitentiary. At no time did appellant move to withdraw his plea.
It is apparent from the record, therefore, that the trial court on at least two separate occasions informed appellant that it could give him the maximum sentence regardless of the plea bargain. At no time, however, did the trial court specifically accept or reject appellant's plea bargain.
Appellant argues that the trial court erred by not following the portion of SDCL 23A-7-11 which specifically requires that the trial court inform the parties of its rejection of the plea bargain. Appellant contends that by sentencing the defendant to more years at the state penitentiary than the number bargained for, the trial court in effect rejected the bargain itself.
SDCL 23A-7-8 reads as follows:
A prosecuting attorney and an attorney for a defendant or a defendant when acting pro se may engage in discussions, with a view toward reaching an agreement that, upon the entering of a plea of guilty or nolo contendere to a charged offense or to a lesser or related offense, the prosecuting attorney will do any one or more of the following:
(1) Move for dismissal of other charges;
(2) Make a recommendation, or agree not to oppose the defendant's request, for a particular sentence, with the understanding that such recommendation or request shall not be binding upon the court;
(3) Agree that a specific sentence is the appropriate disposition of the case; or
(4) Perform other specified acts to be made a part of the agreement.
A court shall not participate in such discussions.
The first kind of sentence agreement set out in subsection 2 above is the kind involved herein. SDCL 23A-7-8 is clear and unambiguous, so we merely read the statute as written and ascertain its meaning therefrom. See Matter of Aiken, 296 N.W.2d 538 (S.D.1980).
SDCL 23A-7-8 is almost word for word the same as Fed.R.Crim.P. 11(e)(1), and more particularly, subsection 2 of our state statute is in fact word for word the same as subsection B of the federal rule. In United States v. Sarubbi, 416 F.Supp. 633, 636 (D.N.J.1976) (emphasis in original), the court stated:
For a type B agreement, the recommendation made or the agreement not to oppose are factors to take into account on sentence, but if sentence is other than requested, there is no right to withdraw the plea.
This is for the obvious reason that in a type B agreement it is part of the agreement *393 itself that the parties understand that the court is not bound by the recommendation or request. Non-acceptance of the request is not a rejection of the agreement, and so is not within Rule 11(e)(1).
In State v. Doherty, 261 N.W.2d 677, 681 fn. 7 (S.D.1978), we specifically adopted Sarubbi and expressed our dislike for the subsection B type of agreement made in the present case. In the context of this case, where the trial court repeatedly advised appellant of his rights and of the fact that it was not bound by the agreement, we hold that the trial court's nonacceptance of the recommended maximum five to six years' sentence did not constitute a rejection of appellant's plea bargain with the State which would have afforded him a right to withdraw his plea under Sarubbi. In order to avoid misleading defendants, lawyers should proceed with extreme caution when bargaining for sentence recommendations as provided for in SDCL 23A-7-8(2).
Accordingly, we affirm.
All the Justices concur.
