Thank you for your replies.
It is clear that to work as Captain, F/O or any other position you need to have the right
to work in the country.
That does not mean at all that you have to be a citizen of the EU. But you need to be legally authorized at least to work. Like in any other job.
The question was if, in order to be a specifically a Commander in any EU country, you had to be first a citizen of any EU member country.
It was clearly answered for the UK case. No need to be .
Spain has a restriction, and it used to be worse: you had to be a Spanish citizen to be a Commander. The law was from 1960. Otherwise, no captaincy.
That changed in 1999, but it seems to be still restricted only to EU citizens.
Legal residents, with right to work, no matter what qualifications and experience they may hold, donīt seem to be as good as EU citizens for the Spanish law.
Any other cases that you may know of?