
333 N.W.2d 440 (1983)
STATE of South Dakota, Plaintiff and Appellee,
v.
Michael TIBBETTS, Defendant and Appellant.
No. 13922.
Supreme Court of South Dakota.
Considered on Briefs March 23, 1983.
Decided May 4, 1983.
Jeffrey P. Hallem, Asst. Atty. Gen., Pierre, for plaintiff and appellee; Mark V. Meierhenry, Atty. Gen., Pierre, on brief.
Michael Tibbetts, pro se.
HENDERSON, Justice.

ACTION/FACTS
Appellant Michael Tibbetts was charged on February 24, 1977, with three complaints of assault and battery, third-degree burglary, and assault with a dangerous weapon without intent to kill. Appellant Tibbetts applied for, and received, court-appointed counsel. After preliminary hearing proceedings, he was bound over on the latter two charges. On February 25, 1977, appellant Tibbetts escaped and remained at large until March 14, 1977, when he voluntarily returned to custody. Appellant entered a guilty plea on May 2, 1977, to the burglary and assault with a dangerous weapon without intent to kill charges which resulted in concurrent sentences of eight and five years respectively. Appellant Tibbetts, an indigent, was incarcerated a total of fifty-two days prior to trial.
On May 6, 1982, appellant Tibbetts filed a motion to correct his sentence pursuant to SDCL 23A-31-1. This motion was denied on August 3, 1982. We reverse and remand.

ISSUES

I.
APPELLEE STATE MAINTAINS APPELLANT CANNOT INVOKE SDCL 23A-31-1 AND THIS COURT HAS NO JURISDICTION TO HEAR THIS APPEAL. WE HOLD THAT THIS COURT DOES HAVE JURISDICTION TO CORRECT AN ILLEGAL SENTENCE.

II.
DID THE TRIAL COURT ERR IN DENYING CREDIT FOR INDIGENT APPELLANT'S PRE-SENTENCE INCARCERATION? WE HOLD THAT IT DID.


*441 DECISION

I.
We must discern if appellant Tibbetts' motion to subtract pre-sentence incarceration time was properly made. SDCL 23A-31-1 provides:

A court may correct an illegal sentence at any time and may correct a sentence imposed in an illegal manner within the time provided in this section for the reduction of sentence. A court may reduce a sentence:
(1) Within one year after the sentence is imposed;
(2) Within one hundred twenty days after receipt by the court of a remittitur issued upon affirmance of the judgment or dismissal of the appeal; or
(3) Within one hundred twenty days after entry of any order or judgment of the Supreme Court denying review of, or having the effect of upholding, a judgment of conviction;
whichever is later. A court may also reduce a sentence upon revocation of probation or suspension of sentence as provided by law. The remedies provided by this section are not a substitute for nor do they affect any remedies incident to post-conviction proceedings. (Emphasis supplied.)
We have recently held that a trial court may not use SDCL 23A-31-1 to increase the length of a sentence. State v. Ford, 328 N.W.2d 263 (S.D.1982).
Appellee State advocates that appellant's motion, filed almost five years to the day from the sentence, is clearly outside of SDCL 23A-31-1. SDCL 23A-31-1 distinguishes between "an illegal sentence" which may be corrected at any time, and "a sentence imposed in an illegal manner" which may be reduced within prescribed time constraints. A denial of credit for an indigent's pre-sentence custody has been held violative of the equal protection clause. Klimas v. State, 75 Wis.2d 244, 249 N.W.2d 285 (1977). Thus, the extra incarceration suffered by appellant Tibbetts is illegal in itself rather than an illegally imposed sentence.
We hold that appellant Tibbetts' request was properly brought under SDCL 23A-31-1, and is properly before us on appeal.

II.
Appellee asserts that the trial court record is insufficient to allow appellant Tibbetts' requested relief. We disagree. Appellant Tibbetts was found to be indigent at the trial court level when court-appointed counsel was granted. Appellant Tibbetts was also unable to post bail while awaiting trial. For our purposes, these factors provide sufficient information concerning appellant Tibbetts' pre-sentence incarceration. As we held in State v. Lohnes, 266 N.W.2d 109, 113 (S.D.1978): "[T]he Fourteenth Amendment equal protection clause requires that credit be given for all pre-sentence custody which results from indigency." (Emphasis supplied.) See also, Patino v. State, 331 N.W.2d 837 (S.D.1983). The only caveat to Lohnes is State v. Cody, 323 N.W.2d 863 (S.D.1982), wherein we held that credit for an indigent's pre-sentence incarceration would be futile on a life sentence. Appellant Tibbetts was sentenced for substantially less than life.
We hold that the trial court erred in denying appellant Tibbetts' motion and we reverse and remand with directions to allow appellant Tibbetts fifty-two days' credit for his pre-sentence incarceration.
Reversed and remanded.
All the Justices concur.
