and the principle is that, when a specific text and a general text occur together, the specific qualifies the general?
The answer is that the Prophet did not say: “None of you should stand nearest to me except those who possess maturity and understanding.” Nor did he say: “Let those among you who possess maturity and understanding make those beneath them leave their places.” Rather, he said: “Let those among you who possess maturity and understanding stand nearest to me.” Thus, he instructed those who possess maturity and understanding to stand nearest to him. This is an encouragement for these older people to come forward and stand nearest to the Messenger of Allah. This is the meaning of the hadith.
Moreover, doing so carries the harm of alienating these boys from the mosque, especially if they are adolescents—such as when one of them is thirteen or fourteen years old—and then we make him leave his place. This will be difficult for him, because he was pleased to be in the first row. Another harm is that, if a particular person removes this boy, the boy will continue to remember him unfavorably; and whenever he remembers him unfavorably, he will bear resentment toward him, for young people generally do not forget what has been done to them.
His statement, “like their funeral biers,” means: as they are arranged in their funeral prayers. Thus, when the funeral biers of these categories—men, boys, and women—are brought together, they are placed in this order nearest the imam: men, then boys, then women.
But does their precedence consist in being positioned further toward the qiblah, or in being nearer to the imam?
The answer is: by being nearer to the imam. Thus, if there is a man, a child, and a female, we place the man nearest to the imam, then the child, then the female, and place the head