Originally Posted by
mfkne
KLM do not check ID on the way out of AMS (unless you check bags), but there are ID checks at boarding in Spain.
That is indeed how it generally goes.
A Dutch resident permit for a non-European citizen without a passport or other accepted international travel document won't generally work to fly from Spain to AMS. More often than not, such person will be able to pull it off when flying from AMS to Spain (at least if not checking in luggage).
The US embassy/consulate staff in the Netherlands can issue a secondary, limited duration ordinary US passport. But the best time to pursue such is before submitting a primary ordinary US passport for visa. Getting such while in Spain has been done before.