P landed at the port of Seattle on July 11, 1901. She is a subject of Japan. On or about July 15, 1901, D, an Immigrant Inspector of the United States, having instituted an investigation into the circumstances of her entering the United States, decided that she came here in violation of law, in that she was a pauper and a person likely to become a public charge -- aliens of that class being excluded altogether from this country by the act of March 3, 1891, 26 Stat. 1084, c. 551. The evidence was transmitted to the Secretary of the Treasury, who on July 23, 1901, issued a warrant addressed to the Immigrant Inspector at Seattle, reciting that P had come into the United States contrary to the provisions of the above act of 1891, and ordering that she be taken into custody and returned to Japan at the expense of the vessel importing her. P filed for a writ of habeas corpus. It alleged that P's imprisonment was unlawful and that she did not come here in violation of the act of 1891 or of any other law of the United States relating to the exclusion of aliens. The Inspector stated that he had found upon due investigation and the admissions of the P that she was a pauper and a person likely to become a public charge, and had 'surreptitiously, clandestinely, unlawfully and without any authority, come into the United States.' P alleged that the investigation was a 'pretended' and an inadequate one; that she did not understand the English language and did not know at the time that such investigation was with a view to her deportation from the country; and that the investigation was carried on without her having the assistance of counsel or friends or an opportunity to show that she was not a pauper or likely to become a public charge. The writ of Habeas corpus was dismissed, and P was remanded to the custody of the Inspector. P appealed.