The binding legal principles established are: (1) An immigration officer's decision to arrest and detain an illegal foreigner under section 34(1) of the Immigration Act 13 of 2002 is discretionary, not mandatory - there is no obligation to arrest or detain. (2) This discretion must be construed and exercised in favorem libertatis (in favor of liberty) given that it involves deprivation of personal freedom. (3) The exercise of this discretion must comply with administrative law principles requiring the decision-maker to apply his mind to the matter, not act capriciously, direct thoughts to relevant data and principles, not rely on irrelevant considerations, and not apply wrong principles. (4) This discretion must be exercised consistently with section 12(1)(a) of the Constitution, which prohibits arbitrary deprivation of freedom or deprivation without just cause - meaning a person may not be deprived of freedom for unacceptable reasons. (5) When a magistrate has granted bail to a suspected illegal foreigner in criminal proceedings, this fact is a relevant and material consideration that an immigration officer cannot ignore when exercising discretion whether to detain that person under immigration laws. (6) Operating under a 'blanket policy' to detain all illegal foreigners negates the exercise of discretion and renders detention unlawful. (7) A referral of an attorney to a Law Society is not a 'judgment or order' as contemplated in section 21A(1) of the Supreme Court Act 59 of 1959 and is therefore not appealable.