
195 Ill. App.3d 1062 (1990)
553 N.E.2d 46
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
WILLIAM JON WISEMAN, JR., Defendant-Appellant.
No. 5-88-0648.
Illinois Appellate Court  Fifth District.
Opinion filed March 20, 1990.
Rehearing denied April 27, 1990.
*1063 Daniel L. Kirwan, of State Appellate Defender's Office, of Mt. Vernon, and Lori L. Mosby, of State Appellate Defender's Office, of Springfield, for appellant.
Darrell Williamson, State's Attorney, of Chester (Kenneth R. Boyle, Stephen E. Norris, and Raymond F. Buckley, Jr., all of State's Attorneys Appellate Prosecutor's Office, of counsel), for the People.
Judgment affirmed.
JUSTICE RARICK delivered the opinion of the court:
Defendant, William Jon Wiseman, Jr., appeals from his conviction of aggravated battery after a bench trial in the circuit court of Randolph County. Defendant was sentenced to four years' imprisonment. We affirm.
In July of 1987, defendant was housed in the Perry County jail awaiting disposition of Perry County charges and a petition to revoke his probation. On the 30th of that month, defendant was transferred to the Randolph County jail for holding while the Perry County jail was being painted. During his stay in the Randolph County jail, defendant struck, kicked and bit two Randolph County jail personnel. Defendant was charged on August 9, 1987, with aggravated battery in connection with this incident. On August 11, bond was set, and on August 27, probable cause was found after a preliminary hearing. Defendant posted no bond. On September 3, 1987, defendant was returned to the Perry County jail. The Perry County charges against defendant subsequently were dismissed on the 16th, but the petition to revoke probation was heard and granted. On November 24, 1987, defendant was sentenced to four years' imprisonment for violating probation and transferred to the Department of Corrections the following day. On July 29, 1988, defendant was brought to court in Randolph County pursuant to a writ of habeas corpus ad prosequendum, at which time defendant was granted a continuance in connection with the charges then pending in Randolph County. Defense *1064 counsel subsequently filed a motion to dismiss these charges based on a violation of defendant's speedy trial rights pursuant to section 103-5(a) of the Code of Criminal Procedure of 1963 (Ill. Rev. Stat. 1987, ch. 38, par. 103-5(a)). The trial court denied defendant's motion, ruling that because section 3-8-10 of the Unified Code of Corrections (Ill. Rev. Stat. 1987, ch. 38, par. XXXX-X-XX), entitled "Intrastate Detainers" (hereinafter Intrastate Detainers Act), applied, Randolph County never had constructive custody of defendant. As defendant failed to invoke the provisions of the Intrastate Detainers Act, he was not entitled to dismissal of the Randolph County charges. Defendant subsequently was convicted of one count of aggravated battery and sentenced to four years' imprisonment.
Defendant first argues on appeal the trial court erred in denying his speedy trial motion. Defendant believes because he was served with a complaint and was not free to leave until he posted bail, he was "in custody" on the Randolph County charges before the proceedings in Perry County terminated. Therefore, once the Perry County proceedings terminated on November 24, 1987, the speedy trial period started running. As no further action was taken on the Randolph County charges until some 191 days later, defendant asserts his conviction for aggravated battery should be vacated. We disagree.
 1-3 Section 103-5(a) of the Code of Criminal Procedure of 1963 (Ill. Rev. Stat. 1987, ch. 38, par. 103-5(a)), entitled "Speedy Trial" (hereinafter Speedy Trial Act), provides that every person in custody in this State shall be tried within 120 days of the date he was taken into custody. Subsection (b) further provides that persons on bail or recognizance shall be tried within 160 days from the date they demand trial. (Ill. Rev. Stat. 1987, ch. 38, par. 103-5(b).) Failure to try an accused within this statutory time frame results in the discharge of the accused. (See, e.g., People v. Lykes (1984), 124 Ill. App.3d 604, 606, 464 N.E.2d 849, 851.) A defendant, however, who is in custody awaiting trial in one county with a charge pending against him in another county is not deemed in custody for the latter offense until such time as the proceedings against him in the first county are terminated and he then is either returned to or held in custody for the second county. (People v. Davis (1983), 97 Ill.2d 1, 13, 452 N.E.2d 525, 530; People v. Clark (1968), 104 Ill. App.2d 12, 20, 244 N.E.2d 842, 846.) This is true even if the defendant already has appeared before the court in the second county but been returned to the first county. The second county does not have custody until the proceedings in the first county are concluded. (See Davis, 97 Ill.2d at 13-14, 452 N.E.2d at 530-31; People v. Wentlent (1982), 109 Ill. App.3d 291, 297, 440 *1065 N.E.2d 296, 300; People v. Gardner (1982), 105 Ill. App.3d 103, 109-12, 433 N.E.2d 1318, 1322-24.) A further qualification of an accused's right to a speedy trial is found in section 3-8-10 of the Uniform Code of Corrections, titled "Intrastate Detainers" (Ill. Rev. Stat. 1987, ch. 38, par. XXXX-X-XX). Under this section, the provisions of section 103-5(b) are made applicable to a person, except for those sentenced to death, committed to any institution or facility or program of the Illinois Department of Corrections who has untried complaints, charges or indictments pending in any county of this State. Consequently, in order to invoke the provisions of the Speedy Trial Act, a defendant who has been committed to the Department of Corrections and who has untried charges pending against him must send his speedy trial demand to the State's Attorney. Once a defendant makes such a demand, pursuant to section 103-5(b), he then must be tried within 160 days.
 4 Here, once the proceedings were terminated in Perry County, defendant was transferred immediately to the penitentiary. Defendant was neither returned to nor held in custody for Randolph County, and, accordingly, Randolph County never obtained custody of defendant following the termination of the Perry County proceedings. Randolph County was not given an opportunity to bring defendant to trial. As a result, the 120-day period with respect to the Randolph County charges never started to run. Rather, once defendant was transferred to the penitentiary, it was incumbent upon to him to invoke the provisions of the Intrastate Detainers Act to trigger his speedy trial rights. This the defendant did not do; consequently, he was not entitled to discharge of his Randolph County charges. It is true defendant never posted bond in connection with his Randolph County charges. Defendant's confinement in the penitentiary, however, was pursuant to his Perry County sentence, not his inability to make bail with respect to the Randolph County charges. Defendant, therefore, was in the custody of the Department of Corrections, not that of Randolph County. The trial court made no error in denying defendant's motion for discharge. See People v. Davis (1981), 92 Ill. App.3d 869, 416 N.E.2d 85. See also Lykes, 124 Ill. App.3d at 608, 464 N.E.2d at 852-53; Wentlent, 109 Ill. App.3d at 299-300, 440 N.E.2d at 301-02.
 5, 6 Defendant also argues on appeal he is entitled to 444 days of credit toward his present sentence because of the time spent in custody between the setting of his bond and his sentencing on the Randolph County charges. Defendant believes, under this court's interpretation of section 5-8-7(b) of the Unified Code of Corrections as set forth in People v. Higgerson (1987), 157 Ill. App.3d 564, 510 *1066 N.E.2d 574, he is entitled to such credit whether or not he was simultaneously in custody for the Randolph and Perry County charges. Section 5-8-7(b) of the Unified Code of Corrections (Ill. Rev. Stat. 1987, ch. 38, par. 1005-8-7(b)) states, however, that an offender shall be given credit on his sentence for time spent in custody "as a result of the offense for which the sentence was imposed." None of the period of defendant's incarceration from the filing of the Randolph County charges to his sentencing on those charges was "a result of the offense for which the sentence was imposed." All of this period was attributable either to his custody in Perry County while awaiting trial on his Perry County charges or to his custody in the Department of Corrections while serving his sentence on the Perry County conviction. Defendant simply is not entitled to any of the requested credit. (See People v. Krankel (1985), 131 Ill. App.3d 887, 899, 476 N.E.2d 777, 787. See also People v. Carter (1989), 193 Ill. App.3d 353, 356-57, 549 N.E.2d 763; People v. Hope (1986), 142 Ill. App.3d 171, 177-78, 491 N.E.2d 785, 789-90.) We find Higgerson and its progeny, People v. Powell (1987), 160 Ill. App.3d 689, 513 N.E.2d 1162, and People v. Cleaves (1988), 169 Ill. App.3d 252, 523 N.E.2d 720, to be distinguishable on their facts. None involved two different counties. Additionally, the defendant in Higgerson was incarcerated due to his failure to post bond in connection with one charge. (See Higgerson, 157 Ill. App.3d at 565, 510 N.E.2d at 575.) Here, defendant was in custody because of the Perry County offense, not his inability to make bond on the Randolph County charges. Unlike the situation in Higgerson, here there is no ambiguity with respect to the basis of defendant's custody. We therefore decline to follow the reasoning of Higgerson and its progeny in this instance, and accordingly, decline to grant defendant's request for 444 days' credit toward the instant sentence. Contra People v. Bradney (1988), 170 Ill. App.3d 839, 869-71, 525 N.E.2d 112, 132-33.
For the aforementioned reasons, we affirm the judgment of the circuit court of Randolph County.
Affirmed.
CHAPMAN and HOWERTON, JJ., concur.
