In the post, Mr. Johnson wrote that his initial reaction to Mr. Breivik’s killing spree was “largely anger, because I feared that his actions would harm not just Norwegian ethnonationalism but white nationalism around the world.”

That began to change, he said, when Mr. Breivik argued that the killings had been an act of ethnic self-defense meant to save the white race from multiculturalism and Muslim immigration.

“Since Breivik went on trial last month, I have found a strange new respect for him,” Mr. Johnson wrote. “He has comported himself in a dignified manner and made a forceful, intelligent, well-argued case for his views and actions.”

Martin Bernsen, a senior adviser to the Norwegian Police Security Service, or P.S.T., said in an email on Tuesday that Mr. Johnson had been arrested pursuant to a section of the country’s immigration act as a preventive measure.

Mr. Bernsen said Mr. Johnson had been “on his way to a right-wing meeting in Oslo.”

“Johnson is now rejected from Norway, and left the country by plane yesterday heading for Hungary, where he has a residence permit,” Mr. Bernsen wrote. “He is not charged with anything in Norway.”

“He was rejected because of national security reasons,” he added. “P.S.T. wanted to prevent him from encouraging a right-wing group in Norway and stop him contributing to new recruitments.”

Mr. Elden said in his email on Monday that his client had entered Norway on Friday and had been arrested near the conference site the next day. After Mr. Johnson was deported to Hungary, Mr. Elden wrote, he left for Portugal, where he was to give a speech on Monday night.