He greased his hair with olive oil and wore dark eye makeup, apparently in an effort to affect contemporary jihadist fashion, according to Mohamad Magomedov, who struck up a friendship with him at the mosque. That look isn’t popular in more-traditional Dagestan.

While Mr. Tsarnaev did find a circle of friends, some congregants at the Salafist mosque dismissed him as strange. Others said they feared his brashness would attract even more attention to them from Russian authorities.

“There are some people who take things too far,” said one congregant. “Everyone is being watched.”