For quasivarieties of algebras, we consider the property of having definable relative principal subcongruences, a generalization of the concepts of definable relative principal congruences and definable principal subcongruences. We prove that a quasivariety of algebras with definable relative principal subcongruences has a finite quasiequational basis if and only if the class of its relative (finitely) subdirectly irreducible algebras is strictly elementary.