hWrit granted. In accordance with the parties’ plea agreement, the district court sentenced relator pursuant to the version of the statute in effect at the time of his guilty plea, see R.S. 14:43.3, which provided for a substantially harsher punishment than at the time of his offense. Because the plea agreement thereby provided for the imposition of an illegal sentence, the agreement is null and void. See, e.g., United States v. Gibson, 356 F.3d 761, 767 (7th Cir. 2004) (“To allow an illegal sentence to stand would impugn the fairness, integrity, and public reputation of the judicial proceedings that have taken place in this case.”); see also Cantrell v. Easterling, 346 S.W.3d 445 (Tenn. 2011) (“If the illegal sentence was a material condition of a plea agreement, then the defendant must be *330given the opportunity (a) to withdraw his plea and stand trial on the original charges or (b) to enter into a legal plea agreement.”); United Stated v. Greatwalker, 285 F.3d 727, 730 (8th Cir. 2002) (“Even when a defendant, prosecutor, and court agree on a sentence, the court cannot give the sentence effect if it is not authorized by law”). Relator’s conviction and sentence are therefore vacated and the parties are returned to status \ 9,qm ante. We remand to the district court for further proceedings consistent with this order.