Saint Paul wrote to the Galatians:
4:21 Tell me, you who desire to be under law, do you not hear the law? 4:22 For it is written that Abraham had two sons, one by a slave and one by a free woman. 4:23 But the son of the slave was born according to the flesh, the son of the free woman through promise. 4:24 Now this is an allegory: these women are two covenants. One is from Mount Sinai, bearing children for slavery; she is Hagar. 4:25 Now Hagar is Mount Sinai in Arabia; she corresponds to the present Jerusalem, for she is in slavery with her children. 4:26 But the Jerusalem above is free, and she is our mother. 4:27 For it is written, “Rejoice, O barren one who does not bear; break forth and shout, you who are not in travail; for the children of the desolate one are many more than the children of her that is married.” 4:28 Now we, brethren, like Isaac, are children of promise. 4:29 But as at that time he who was born according to the flesh persecuted him who was born according to the Spirit, so it is now. 4:30 But what does the scripture say? “Cast out the slave and her son; for the son of the slave shall not inherit with the son of the free woman.” 4:31 So, brethren, we are not children of the slave but of the free woman.
This is a rather complicated allegory, but the intent of the Apostle is to associate Christians with promise–as Isaac was the offspring of the promise to Abraham–and non-believers with nature, that is, offspring by flesh. In effect, he reversed the common interpretation of the Jews, who claimed to be offspring of Isaac and therefore in covenant with God, versus those who were of the non-covenant line of Ishmael.
The Church would not use the word “bastard” to describe Ishmael and his line, but the Bible and Church would say that the line of Ishmael is not the Old Testament covenant line promised by God, which was through Isaac. Ishmael was born of the servant maid of Sarah, and in accord with the custom of the time, was regarded as the legitimate offspring of Abraham. Even so, he was not given the birthright and blessing of the covenant, which God had always intended for Isaac and his descendants. God did not abandon Hagar and Ishmael, but He did not provide them the fullness of the covenant blessing and promises. With the coming of Christ, the ultimate Offspring of the covenant promise, neither Jew nor Arab nor Gentile has any claim to covenant purely on the natural level, but only by supernatural birth, through sacramental baptism in Christ.