An investigation by the Department of Education is looking into why a federal immigration officer showed up at a Queens elementary school.

A spokesman for the Mayor says the officer came to PS 58 in Maspeth Thursday looking for a fourth grader. They say a school safety agent and an administrator turned him away because he didn't have a warrant.

Mayor Bill de Blasio has been told about the incident according to his spokesman.

Meanwhile, schools commissioner Carmen Farina issued a statement.

"All students, regardless of immigration status, are welcome in NYC public schools, and parents should rest assured that we will do everything in our power to protect students, staff and families," the statement read. "The federal agent was turned away — we're looking into this incident and are providing schools with additional information on our protocol and more trainings."

Under DOE protocol, school officials are not required to allow non-local law enforcement on to school property.

The mayor has pledged the NYPD will never come after undocumented immigrants.