
247 S.C. 15 (1965)
145 S.E.2d 419
William T. McCALL, Appellant,
v.
The STATE of South Carolina, Ellis C. MacDougall, Director, Board of Corrections, State of South Carolina, and R. Fuller Goodman, Warden, South Carolina State Penitentiary, Respondents.
18424
Supreme Court of South Carolina.
November 29, 1965.
*16 James D. Jefferies, Esq., of Greenwood, for Appellant.
Messrs. Daniel R. McLeod, Attorney General, and Edward B. Latimer, Assistant Attorney General, of Columbia, for Respondents.
*17 James D. Jefferies, Esq., of Greenwood, for Appellant, in Reply.
November 29, 1965.
BRAILSFORD, Justice.
This is an appeal from an order of the circuit court dismissing a writ of habeas corpus and remanding petitioner to custody. The petition for the writ challenged the validity of a sentence to imprisonment for five years, imposed upon petitioner in June, 1962, in Greenwood County. According to its terms, this sentence was to be served consecutively to a life sentence which had been imposed upon petitioner in February, 1962, in Abbeville County.
The circuit court held on conflicting evidence that petitioner had effectively waived representation by counsel when he entered a plea of guilty in Greenwood County, and that the sentence then imposed upon him *18 is valid. This conclusion is ably challenged by counsel for petitioner, who appears for him on this appeal by appointment of the Chief Justice. However, we need not pass upon the validity of the Greenwood sentence because the record shows that the petitioner is confined under a valid sentence of imprisonment for his whole lifetime. Even if the Greenwood County sentence should be vacated, the petitioner would not be entitled to be released.
The inquiry on habeas corpus is limited to the legality of the prisoner's present detention. The only remedy which can be granted is release from custody, whether absolute or conditional. The writ is not available to test the legality of a conviction or sentence where a decision in the prisoner's favor will leave him in lawful confinement under another existing sentence. Bearden v. Manning, 238 S.C. 187, 119 S.E. (2d) 670; Bowers v. State, 241 S.C. 282, 127 S.E. (2d) 881; Balkcom v. Chastain, 220 Ga. 265, 138 S.E. (2d) 319; Pippin v. Sheffield, 220 Ga. 179, 137 S.E. (2d) 627. This rule is fully applicable on federal habeas corpus. Holiday v. Johnston, 313 U.S. 342, 350, 61 S.Ct. 1015, 85 L.Ed. 1392; McNally v. Hill, 293 U.S. 131, 55 S.Ct. 24, 79 L.Ed. 238; see 26 Modern Federal Practice Digest, Habeas Corpus, Key 50b, where decisions too numerous to cite are digested.
Affirmed.
TAYLOR, C.J., and MOSS, LEWIS and BUSSEY, JJ., concur.
