Why were Italian immigrants once considered non-white?

Just learned about this briefly in a college History class prof didn’t really go into much detail on why this was, can some explain further please?