One of YouTube’s biggest celebrities found himself entangled early Friday in news coverage of the mass shooting at two mosques in New Zealand.

A gunman who had broadcast part of the attack that left at least 49 people dead urged those watching to “subscribe to PewDiePie,” referring to the alias used by Felix Kjellberg, a Swede whose channel has long dominated YouTube and courted controversy along the way.

Mr. Kjellberg was quick to distance himself from the shooting.

“I feel absolutely sickened having my name uttered by this person,” he said on Twitter. “My heart and thoughts go out to the victims, families and everyone affected by this tragedy.”

Mr. Kjellberg is no stranger to controversy. In recent years, he has been embraced by some on the far right and faced criticism for his use of anti-Semitic imagery and racist and sexist language. Here is a closer look at PewDiePie and the New Zealand gunman’s words.