Our Rabbis taught: What is the order [of the four Scriptural portions in the head-tefillin]?

‘Sanctify unto Me' ( Exodus 13: 1-10) and ‘And it shall be when the Lord shall bring you' (Exodus 13:11-16) are on the right; while ‘Hear' (Deuteronomy 6:4-9) and ‘And it shall come to pass if you shall hearken diligently' (Deuteronomy 11:13-21) are on the left.

But it has been taught just the reverse?

Abaye said, This is no contradiction, for in the one case the reference is to the right of the reader (who is standing in front of the person wearing the tefillin...), whereas in the other it is to the right of the one that wears them; the reader thus reads them according to their order.

R. Hananel said in the name of Rav, If a man reversed the order of the Scriptural portions, it is invalid.

Abaye said, This is so only [if he put] a portion that should be inside outside or what should be outside inside, but if he put what should be inside also inside or what should be outside also outside, it does not matter.

Thereupon Raba said to him, Why is it that [the placing of] an inside portion outside or of an outside portion inside is not valid?

It is, is it not, because that which should look out into the open does not do so, while that which should not look out into the open actually does so?

Then, likewise, [the placing of] an outside portion also outside or an inside portion also inside [should also be invalid], since what should look out into the open on the right looks out on the left, and what should look out into the open on the left looks out on the right?

We must rather say that there is no such distinction.