A petition brought under this article must be filed in the superior court of the county in which the petitioner is being detained. The superior courts of such counties shall have exclusive jurisdiction of habeas corpus actions arising under this article. If the petitioner is not in custody or is being detained under the authority of the United States, any of the several states other than Georgia, or any foreign state, the petition must be filed in the superior court of the county in which the conviction and sentence which is being challenged was imposed.
OCGA § 9-14-43