For most immigrants and refugee claimants, arriving in Canada is a straightforward process.
Documents are scrutinized, the appropriate boxes are checked, and it's off to find a place to live until a final determination is made by immigration authorities.
A small but not inconsequential minority has a far rougher time of it. Canada is one of a dwindling number of countries that puts some immigration detainees in prison, because of concerns relating to identification or suspected criminality.
A study released last year by the University of Toronto law school's International Human Rights Program found that, in 2013, roughly 2,500 detainees entered an opaque system that can see them shuttled from overcrowded and overwhelmed federal detention centres to local jails, sometimes for years at a time.
This week a group of 50 detainees in Ontario announced a hunger strike to protest against the conditions of their imprisonment.
They are being held in maximum security prison facilities, often under lockdown, some of them alongside hardened criminals or in segregation units.
The magnitude of the problem shouldn't be overstated. Our country will welcome roughly 300,000 new arrivals this year, and even refugee claimants who arrive on our shores unannounced are for the most part quickly released. Most arrivals to Canada are never detained at all, and for those who are, the median detention time is 25 days, according to one watchdog group.
Border and immigration officials have the legal power to hold and investigate someone they believe presents a danger to public safety; it's hard to see how it could be otherwise.
However, human rights advocates are right to raise concerns about the risk of arbitrariness in the system. It is also clear that many, if not most of the long-term detainees, some of whom suffer from post-traumatic stress disorder or profound mental health issues, don't belong in a criminal jail.
There has to be a better way to safely detain arrivals to Canada who raise suspicions – while speeding up the process to determine whether they truly deserve to be let in, or kept out.