We can only hope this is an outbreak of bureaucratic bone-headedness. One month before the opening of WorldPride, the global human rights conference for gay, lesbian, bisexual and transgender and intersex activists hosted by the University of Toronto, federal officials have denied visas to eight participants from Uganda.

Not only does this send the wrong signal around the world. It heightens the risk of persecution for African trailblazers who face the harshest anti-homosexuality penalties on the planet. It thwarts the purpose of the long-planned conference, which is to promote an international dialogue on gay rights and build a global solidarity movement. It is at odds with the official welcome extended by the Canadian government, the Ontario government and the city of Toronto and the support of sponsors ranging from the Toronto Dominion Bank to Bud Light. (The Star is a media sponsor.) It violates Canada’s Charter of Rights, which prohibits discrimination on the basis of sexual orientation. And it contradicts Canada’s forthright condemnation of Uganda’s anti-gay laws.

On every count, this is an ill-judged decision.

The ostensible reason for the refusal to admit the Ugandan delegates was that they might attempt to seek asylum in Canada. It is not the role of immigration officials to pre-empt refugee claims. In fact, no government has a right to spurn asylum seekers. Under the United Nations Convention on Refugees, any person can seek protect if he or she has a well-founded fear of persecution for reasons of race, religion. Uganda’s gay right activists – who face penalties of up life imprisonment – certainly appear to qualify.

Even if Immigration Minister Chris Alexander reins in his suspicious employees, they have already cast a shadow over the human rights conference one of the highlights of WorldPride 2014 a 10-day festival of queer culture featuring parades, parties, theatre, awards and concerts by top performers. Organizers at the U of T are bracing for further headaches as they scramble to finalize the arrangements for 160 speakers and 400 delegates from more than 40 countries. In many of those countries, homosexuality is a crime, punishable by sanctions ranging from fines to the death penalty.

If immigration officials persist in blocking visitors from these regimes, conference organizers will spend the next month in running battles with Ottawa. Torontonians, who had hoped to showcase their city as a living example of diversity and respect for human rights, will be undermined by their own government. And Canada, which led the way on same-sex marriage and gay pride issues, will lose its stature as a defender of equality.

Five months ago, Canada spoke out strongly against Russian President Vladimir Putin’s anti-gay laws. Foreign Affairs Minister John Baird sent a sharply worded letter to his Russian counterpart, urging the Kremlin to act in the “Olympic spirit” and uphold the human rights of Russians and foreign athletes competing in the Sochi games.

Three months ago, Baird sent a stern warning to Uganda. “This act (the Uganda Anti-Homosexuality Act) is a serious setback for human rights, dignity and fundamental freedoms and deserves to be widely condemned. Regrettably this discriminatory law will serve as an impediment to our relationship with the Ugandan government.”

What part of this official censure do immigration officials not get? Why are they slamming the door on the victims of discrimination that the Canadian government was seeking to defend?

This incident can be resolved with some quiet negotiations. “We are working in good faith with organizers to make the conference a success,” said an aide to Alexander. “However, we must ensure our immigration system is protected.”

That is mildly encouraging. But it leaves Canadians who respect human rights and want to decriminalize homosexuality standing on guard against overzealous federal functionaries.