Petitioner seeks a writ of habeas corpus on the ground that his conviction for burglary was invalid because his plea of guilty was coerced. Petitioner claims that the prosecutor wrongfully induced him to enter a guilty plea by agreeing not to file habitual criminal charges against petitioner in *436exchange for his plea. The district court denied the writ. Watkins v. Solem, 437 F.Supp. 824 (D.S.D.1977). This appeal followed. We affirm.
We have examined the record and find that the state trial judge meticulously interrogated petitioner at the time of his plea of guilty. The record shows that the plea was voluntarily made. Petitioner challenges this finding on the ground that the state prosecutor “threatened” to file habitual criminal charges unless petitioner agreed to plead guilty to two charges of third degree burglary.
The government urges on appeal that the issue is disposed of by Bordenkircher v. Hayes, - U.S. -, 98 S.Ct. 663, 54 L.Ed.2d 604 (1978), recently decided by the Supreme Court. There the prosecutor told petitioner during plea bargaining that if he did not plead guilty to a charge of uttering a forged instrument an additional charge under Kentucky’s habitual criminal statute would be filed. Petitioner Hayes refused to enter a guilty plea and the prosecutor did, in fact, file the habitual criminal charge. Petitioner claimed that his subsequent conviction was void in that the habitual criminal charge was based upon “prosecutorial vindictiveness” and was a result of retaliation for his exercise of the right to trial. In upholding the conviction and denying the writ the Court observed:
To punish a person because he has done what the law plainly allows him to do is a due process violation of the most basic sort, and for an agent of the State to pursue a course of action whose objective is to penalize a person’s reliance on his legal rights is “patently unconstitutional.” But in the “give-and-take” of plea bargaining, there is no such element of punishment or retaliation so long as the accused is free to accept or reject the prosecution’s offer.
Plea bargaining flows from “the mutuality of advantage” to defendants and prosecutors, each with his own reasons for wanting to avoid trial. Defendants advised by competent counsel and protected by other procedural safeguards are presumptively capable of intelligent choice in response to prosecutorial persuasion, and unlikely to be driven to false self-condemnation. Indeed, acceptance of the basic legitimacy of plea bargaining necessarily implies rejection of any notion that a guilty plea is involuntary in a constitutional sense simply because it is the end result of the bargaining process. By hypothesis, the plea may have been induced by promises of a recommendation of a lenient sentence or a reduction of charges, and thus by fear of the possibility of a greater penalty upon conviction after a trial.
While confronting a defendant with the risk of more severe punishment clearly may have a “discouraging effect on the defendant’s assertion of his trial rights, the imposition of these difficult choices [is] an inevitable” — and permissible — “attribute of any legitimate system which tolerates and encourages the negotiation of pleas.” Chaffin v. Stynchcombe, supra, 412 U.S. 17 at 31, 93 S.Ct. 1977, 36 L.Ed.2d 714. It follows that, by tolerating and encouraging the negotiation of pleas, this Court has necessarily accepted as constitutionally legitimate the simple reality that the prosecutor’s interest at the bargaining table is to persuade the defendant to forego his right to plead not guilty.
- U.S. at --, 98 S.Ct. at 668 (citations omitted).
Hayes serves as strong support for denial of habeas corpus relief in the present case. However, we feel its holding, that it is not retaliatory for the state to file charges that it at all times had the right to file, is very narrow. The case cannot be read as a grant of carte blanche authority for a prosecutor to unduly threaten and coerce a criminal defendant into making a guilty plea. It would appear that a prosecutor’s offer to refrain from filing more serious charges in exchange for the defendant’s guilty plea to a lesser charge is not unconstitutional per se. However, prosecutors should not view Hayes as giving them the right to abuse their prosecutorial powers.
*437In each case where the invalidity of a guilty plea is asserted the record must be examined to assure that the plea was made voluntarily and was not the product of coercion. The voluntariness of a guilty plea must be determined by considering the relevant circumstances surrounding it, and the prosecutor’s promise may serve as a “but for” cause of the guilty plea without rendering the plea involuntary. Cf. Brady v. United States, 397 U.S. 742, 750, 90 S.Ct. 1463, 25 L.Ed.2d 747 (1970). The fundamental test is whether the plea of guilty was “an intelligent act ‘done with sufficient awareness of the relevant circumstances and likely consequences.’ ” McMann v. Richardson, 397 U.S. 759, 766, 90 S.Ct. 1441, 1446, 25 L.Ed.2d 763 (1970), quoting Brady v. United States, supra at 397 U.S. 748, 90 S.Ct. 1463.
The state court record fully justifies the denial of the writ of habeas corpus here.
Judgment affirmed.