Federal agents who were turned away from a Queens school after showing up without a warrant and asking about a fourth-grader were investigating another person’s immigration application — not probing the pupil, officials claim.

“The purpose of the visit was to verify certain facts about the student’s enrollment in relation to a request for an immigration benefit. At no time did the officers ask to see or speak with the student, who was not the subject of the administrative inquiry,” said US Citizenship and Immigration Services spokeswoman Anita Rios Moore.

The USCIS is an arm of Homeland Security.

News that immigration agents visited PS 58 in Maspeth Thursday to inquire about the fourth-grade student prompted outrage from city and elected officials.

The Department of Education said that only one agent showed up, that he didn’t have a warrant and that he was turned away.