The ruling overturns an earlier board decision in the case of Jahanzeb Malik that Ottawa had failed to make its case for the need for secrecy.
During several hours of closed-door hearings, the board's Harry Adamidis heard a new application from Canada Border Services Agency for a publication ban on the identity of the undercover officer.
Malik's lawyer Anser Farooq opposed the application on the basis there was no new information to warrant hearing it.
Farooq also argued the case against his client turns on the conduct and credibility of the officer and said the hearing should be open to the public.
However, Jessica Lourenco, lawyer for the immigration minister, argued she had new information that warranted hearing the new application.
The RCMP officer, who is a proposed witness at future hearings involving Malik, is still active in the field of criminal investigations, Lourenco argued.
As a result, she said, revealing his real identity or even the pseudonym he uses could put him in potential danger and make him a target for both criminals and Islamic State supporters.
In siding with the government, Adamidis said in summarizing the proceedings that hearing the matter in private was appropriate to avoid "muzzling" any of the participants.
It was reasonable to infer that disclosure of the officer's identity could cause harm, Adamidis said. As a result, he ordered a publication ban on any information that could reveal the agent's ID.
Adamidis also ordered Malik, 33, detained in immigration custody pending a fourth detention review, tentatively scheduled for May 11 or 12. The decision relied on previous government submissions — none of which has been tested or proven — that the flooring contractor represents a flight risk and a public danger.
At previous hearings, Lourenco said Malik talked about blowing up the U.S. consulate and buildings in Toronto's financial district and videotaping the attacks to inspire others.
Without presenting any evidence, she also said Malik tried to radicalize the undercover officer by showing him videos apparently of Islamic State beheadings and expressed support for al-Qaida.
Farooq, who has appealed to the government of Pakistan to help spring his client and smooth the way for him to return to Pakistan, made no submissions on the ongoing detention. He did say no one has come forward to stand surety for the divorced father of two, who was arrested March 9.
Ottawa promised to expedite an admissibility hearing for Malik, who came to Canada as a student in 2004 and became a permanent resident in 2009.
Farooq has previously complained about the government's unexplained decision to try to deport Malik — who is essentially being held in solitary confinement at a jail in Lindsay, Ont. — rather than charge him criminally.
Also on HuffPost