A person in federal immigration detention is ineligible for a writ of habeas corpus from a state court if his state sentence and probation or parole have been completed. Villa, a resident of the United States, but citizen of Mexico, pleaded guilty to a felony in 1989 and served three years on probation. Years later, he faced deportation because of the conviction. He filed a petition for writ of error coram nobis challenging the plea due to the inadequate advisements he received concerning the immigration consequences. The Court of Appeal rejected his claims and denied relief, concluding that Villa could challenge the legality of custody by filing a habeas petition in California. Although the prosecution prevailed, it sought review, challenging the appellate court’s opinion that a writ of habeas corpus is available to a litigant who has already served his state sentence and who is presently detained by a governmental agency other than California. The Court held that because Villa was no longer in California custody for the 1989 conviction, but was instead in federal custody in another state, he was ineligible for relief by way of a writ of habeas corpus.