
    (608 P.2d 1044)
    No. 51,262
    Carl J. Johnson, a/k/a Hershel B. Wesson, Appellant, v. State of Kansas, Appellee.
    
    Opinion filed April 4, 1980.
    
      Robert G. Frey, of Frey, Smith & Schmidt, of Liberal, for appellant.
    There was no appearance by appellee.
    Before Foth, C.J., Swinehart and Meyer, JJ.
   Meyer, J.:

This is an appeal from the trial court’s denial of relief as to an application by Carl J. Johnson, a/k/a Hershel B. Wesson (appellant), filed pursuant to K.S.A. 60-1507.

Appellant is presently incarcerated in Texas and is serving a life sentence imposed upon his conviction for burglary in that state in 1973. The normal sentence for burglary was enhanced to the life term pursuant to the Texas habitual criminal act, based upon a 1954 felony conviction in Texas and upon a 1964 felony sentence in Kansas upon his guilty plea. Appellant filed this action for relief pursuant to K.S.A. 60-1507, challenging the propriety of the Kansas sentence. Appellant’s petition and his deposition filed in this case indicate that he was unconditionally discharged from the Kansas State Penitentiary in June, 1971, having fully completed the sentence imposed.

At the outset, it is appropriate to discuss the jurisdictional aspects of this case due to the novel facts presented herein. Although neither party raised the issue of jurisdiction, nor did the trial court speak to the matter, such facts do not abrogate this court’s obligation to determine jurisdictional questions. Stanton v. KCC, 2 Kan. App. 2d 228, 230, 577 P.2d 367, rev. denied 225 Kan. 845 (1978).

K.S.A. 60-1507(a) provides;

“A prisoner in custody under sentence of a court of general jurisdiction claiming the right to be released upon the ground that the sentence was imposed in violation of the constitution or laws of the United States, or the constitution or laws of the state of Kansas, or that the court was without jurisdiction to impose such sentence, or that the sentence was in excess of the maximum authorized by law, or is otherwise subject to collateral attack, may at any time move the court which imposed the sentence to vacate, set aside or correct the sentence. ” (Emphasis added.)

K.S.A. 60-1507 thus provides relief only when a person is “in custody under sentence of a court of general jurisdiction.” The statute clearly contemplates that the sentence being attacked is the one resulting in the present custody. In this case appellant attempts to challenge a Kansas conviction which has expired, but which was used for enhancement purposes for his present Texas confinement. Our statute does not permit such a challenge since plaintiff is not “in custody” under the Kansas sentence he attempts to challenge.

The present situation is to be distinguished from that of a Kansas prisoner who attacks his present Kansas confinement on the basis that his current Kansas sentence relies on invalid prior convictions obtained elsewhere. See, e.g., James v. State, 220 Kan. 284, 553 P.2d 345 (1976). K.S.A. 60-1507 permits such an action since the prisoner is in custody under the sentence he seeks to attack. The Texas courts have recognized a similar remedy under their counterpart to K.S.A. 60-1507. See Craig v. Beto, 458 F.2d 1131, 1134 (5th Cir. 1972).

Kansas cases have recognized the propriety of relying on federal interpretation of 28 U.S.C. § 2255 in construing the provisions of K.S.A. 60-1507, which was patterned after the federal statute. Baier v. State, 197 Kan. 602, 604, 419 P.2d 865 (1966); State v. Richardson, 194 Kan. 471, 472, 399 P.2d 799 (1965). Numerous federal decisions have recognized that relief under 28 U.S.C. § 2255 is authorized only to persons in custody under the sentence which is sought to be set aside. For example, in Blair v. United States, 349 F.2d 405 (10th Cir. 1965), Blair was convicted and sentenced to federal custody. After completing the federal sentence Blair was imprisoned at the Kansas State Penitentiary under a separate sentence. Blair brought an action under 28 U.S.C. § 2255 seeking to set aside the prior federal sentence. The Tenth Circuit held that § 2255 was an inappropriate vehicle for challenging the prior sentence since a motion to vacate sentence “will not lie unless the movant is in custody under such sentence.” 349 F.2d at 405. See also Lopez v. United States, 186 F.2d 707 (9th Cir. 1950): United States v. Tees, 211 F.2d 69, 71-2 (3d Cir. 1954); United States v. Bradford, 194 F.2d 197, 200 (2d Cir.), cert. denied 343 U.S. 979 (1952).

Under these cases appellant is not “in custody” within the meaning of K.S.A. 60-1507, and we hold that the district court was without jurisdiction to entertain his petition under that section.

The judgment is vacated and the case is remanded to the district court with directions to dismiss for lack of jurisdiction.  