
710 So.2d 527 (1997)
Jason HAVIS
v.
STATE.
CR-95-2193.
Court of Criminal Appeals of Alabama.
September 26, 1997.
Opinion on Return to Remand February 13, 1998.
E. Charles Ogden III, Guntersville, for appellant.
Bill Pryor, atty. gen., and Jack Willis, asst. atty. gen., for appellee.
McMILLAN, Judge.
The appellant, Jason Havis, appeals the trial court's order summarily dismissing his Rule 32, Ala.R.Crim.P., petition for post-conviction relief.
In his petition, the appellant alleges that he is entitled to relief from two robbery convictions resulting from guilty pleas to two counts of robbery in the first degree, a violation of § 13A-8-41, Code of Alabama 1975. He was sentenced to two 15-year terms of imprisonment, split; and he was ordered to serve 3 three years and was placed on 5 years' probation. The appellant did not file a direct appeal.
The appellant argues that the trial court lacked jurisdiction to render the judgment or to impose the sentence, and that the sentence imposed exceeds the maximum authorized by *528 law or is otherwise not authorized by law. In support of his argument, the appellant states that on July 20, 1994, the Marshall County district attorney's office filed a motion seeking to revoke his probation. On August 22, 1994, the trial court denied the State's motion to revoke but stated in its order denying the motion that "as a condition of the defendant's probation, he be required to be incarcerated in the prison system of this State for a period of two years following the completion of the three years incarceration." The appellant argues that because the additional two-year sentence the trial court added to his split sentence was imposed more than 30 days after the imposition of the original sentence, the trial court was without jurisdiction to modify the original sentence.
The authority to sentence a defendant to a "split" sentence is found in § 15-18-8, Code of Alabama 1975. Section 15-18-8(a)(1) provides:
"(a) When a defendant is convicted of an offense and receives a sentence of 15 years or less in any court having jurisdiction to try offenses against the State of Alabama and the judge presiding over the case is satisfied that the ends of justice and the best interests of the public as well as the defendant will be served thereby, he may order:
"(1) That the convicted defendant be confined in a prison, jail-type institution or treatment institution for a period not exceeding three years and that the execution of the remainder of the sentence be suspended and the defendant be placed on probation for such period and upon terms as the court deems best."
Section 15-18-8(b) provides, in part, that "[p]robation may be limited to one or more counts or indictments, but, in the absence of express limitation, shall extend to the entire sentence and judgment."
Section 15-18-8(c) provides:
"(c) Regardless of whether the defendant has begun serving the minimum period of confinement ordered under the provisions of subsection (a), the court shall retain jurisdiction and authority throughout said period to suspend that portion of the minimum sentence that remains and place the defendant on probation, notwithstanding any provision of the law to the contrary and the court may revoke or modify any condition of probation or may change the period of probation."
It is clear to this Court that the legislature, in enacting § 15-18-8, intended to provide that a defendant whose sentence was being "split" pursuant to that section could be sentenced to mandatory confinement for a period not exceeding three years, after which the defendant could be placed on probation, in the absence of express limitation, for the remainder of his sentence. The record in this case reveals that the manner in which the trial court "split" the appellant's 15-year sentence3 years' imprisonment and 5 years on probationwas proper. However, the trial court's order issued after the hearing on the State's motion to revoke probation, which increased the period of the appellant's confinement from three years' to five years' imprisonment was not authorized by the Split Sentence Act and was, therefore, improper. Cf. Wood v. State, 602 So.2d 1195 (Ala.Cr.App.1992) (wherein the trial court ordered an improper execution of a valid sentence). A trial court has the duty to sentence a defendant in accordance with the law. See Wood v. State, supra; Abram v. State, 574 So.2d 986, 988 (Ala.Cr.App.1990). Here, the trial court did not have the authority to increase the appellant's period of confinement from three to five years; it was, however, authorized to revoke or modify any condition of the appellant's probation or to change the period of probation.
Therefore, this cause is remanded to the trial court to allow it to vacate its order improperly modifying an otherwise valid sentence. An order showing compliance with the opinion shall be forwarded to this court within 45 days from the date of this opinion.
REMANDED WITH INSTRUCTIONS.
All judges concur.

On Return to Remand
McMILLAN, Judge.
On September 26, 1997, we remanded this cause to the trial court with instructions that *529 that court vacate its order purporting to modify an otherwise valid sentence.
The appellant, Jason Havis, was originally sentenced to two terms of 15 years' imprisonment. Those sentences were split and he was ordered to serve 3 years' imprisonment and was placed on 5 years' probation. Subsequently, the district attorney's office filed a motion seeking to revoke the appellant's probation. The trial court denied the motion, but ordered that "as a condition of the defendant's probation, [the appellant] be required to be incarcerated in the prison system of this State for a period of two years following the completion of the three years incarceration." The manner in which the trial court originally split the appellant's 15-year sentences3 years' imprisonment and 5 years on probationwas proper. However, the trial court's order issued after the hearing on the State's motion to revoke probation, which increased the period of the appellant's confinement from three years to five years was not authorized by the Split Sentence Act and was, therefore, improper. § 15-18-8, Code of Alabama 1975. Here, the trial court did not have the authority to increase the appellant's period of confinement from three to five years; it was, however, authorized to revoke or modify any condition of the appellant's probation or to change the period of probation. § 15-18-8(c), Code of Alabama 1975.
The trial court, in compliance with this court's instructions, issued the following order:
"In compliance with the decision of the Alabama Court of Criminal Appeals, the judgment entered herein on August 22, 1992, is hereby set aside and held for naught. By agreement, the defendant should be released from incarceration on Monday, November 10, 1997, to community correction and shall submit to electronic monitoring until June 18, 1998, at which time he shall return to active probation.
"Should it be necessary that the defendant must be returned to the prison system of the State of Alabama for processing, then upon such processing, the defendant shall be released from incarceration. The above community service is a condition of probation."
The trial court has complied with our instructions and its judgment is affirmed.
AFFIRMED.
All judges concur.
