My question is NOT about the problems associated with secondary consequences of illegal immigration, such as unemployment of the native workforce. Nor is it about the causes of illegal immigration, such as the hardships faced by people living in a neighboring country, which causes them to cross the border illegally.
My question is specifically about the ethical dilemma of betraying the trust of a fellow-being versus breaking the law of the land.
The dilemma that is mentioned in the heading can also be asked in another way: If you have won the trust of a stray dog, is it ethical to turn him/her over to animal-control?
In other words, which duty is higher -- your duty to a fellow-being / friend, or your duty to the laws of your country?