It is a dialect of the ancient Leonese language of northern Spain, which today is considered a part of the Asturian language, which in its turn is considered by many a dialect of Spanish.
However, these amalgamations in the Spanish territory did not affect Mirandese, which is a distinct language in relation to both Portuguese and Spanish. It is the last remnant of the ancient language of the Kingdom of León.