In the Babylonian Talmud, Tractate Sanhedrin (91a), we read about a most relevant story that took place in the days of Alexander of Macedonia, known as Alexander the Great (4th century before the common era).
Just after Moshe's death, when Yehoshua was about to enter the Land of Israel together with his People, there were seven tribes hostile to the Jews occupying the Land. Yehoshua offered them peace and security on condition that they would commit themselves to the Seven Commandments of Noach, the basic moral code for all humanity.
In case they would refuse, and as such ,implying that they would not adhere to civilized behavior, Yehoshua informed them that they still had the option to leave peacefully. After this, he led his People into the Land. Since most tribes refused to opt for either suggestion, war broke out. The only tribe which actually left were the Cana'anites. Tradition has it that they settled in Africa (Rambam, Melachim, 6:5).
Hundreds of years later, the Cana'anites came to Alexander's international court with a claim that the Land of Israel should be returned to them. When the court inquired into their reasons, the Cana'anites, also called "B'nai Africa" (inhabitants of Africa), said that they were forced out of the Land by the Israelites in the days of Yehoshua and that this injustice should be rectified. When Alexander asked them for proof of their claim to the Land, they responded that it was the Torah of the Jews that in fact supported it. Did it not say, "The land of Canaan with the coasts thereof"? (Bamidbar/Numbers 34:2) Since Canaan was their forefather, they had a legitimate claim to return to the Land and take possession of it.
Consequently, Alexander (who is known to have been somewhat sympathetic to the Jews) turned to the sages with a request to respond. One Jewish ignoramus by the name of Gebiha ben Pesisa, known for his great love for his fellow Jews, asked that he defend the Jewish claim to the Land against the Canaanites:
"Authorize me to go and plead against them before Alexander of Macedonia. Should they defeat me, then (you can) say: 'You have defeated an ignoramus from among us,' and if I defeat them, then say: 'The Torah of Moshe has defeated them.'"
After the sages decided to give him their approval, Gebiha ben Pesisa said to the Canaanites, "From where do you have your proof?"
"From the Torah!" they responded.
"I will also bring a proof from the Torah," said Gebiha ben Pesisa, "for it says that at the time that Cham, one of Noach's children, had uncovered his father's nakedness, Noach said, 'Cursed be Canaan, a servant of servants shall he be unto his brothers.'" [Bereshit/Genesis 9:25; Canaan was another name for the children of Cham] Gebiha ben Pesisa continued, arguing that since the Cana'anites, due to this curse, became slaves to the children of Shem [another son of Noach and the forefather of the Semitic Peoples and the Jews], the Jews would, in any case, be the owners of the land: "Whatever a slave acquirers belongs to the master, since the slave is the property of his master. Moreover", he said, "you have not served us for years!"
Then Alexander said to [the Cana'anites], "Answer him."
"Give us three days," they responded. They looked, but found no answer. And they left.
When carefully studying this incident, several matters are difficult to understand. First of all, it is rather obvious that the Cana'anites were guilty of reading the Torah selectively. Had they turned the page, they would no doubt have found that the Land was already promised to Avraham in earlier days, and that the Torah keeps on making the point that God willed it to the Jews.
Even more mysterious is the defense of Gebiha ben Pesisa. Why did he use an argument that was so roundabout? Why did he not use the most obvious argument; i.e., that the Torah makes it abundantly clear that the Land was given to the Jews? He could have quoted tens of verses to back up his claim!
Maharasha, in his commentary, argues that the motivation behind the Cana'anites was much more sophisticated than one might imagine. The Cana'anites had read the Torah very carefully and were well aware of the promise that God had made to the Israelites concerning the Land. They reminded Alexander's court that they, the Cana'anites, had been forced out of the country because of their immoral behavior. The Holy Land had no longer been able to contain them and had consequently spat them out. But, continued the Cana'anites, the Israelites had become just as evil as they, the Cana'anites, had been. They had also become disobedient and had violated the moral code. Even more so, had not the Torah made it abundantly clear that the Jews would only merit the Land when they would be a holy nation as demanded by the Torah? In that case, the Jews no longer had a claim on the Land and they, the Cana'anites, having lived there prior to the Jews, had full right to claim it in return.