Mr. Samson, 27, is black and the victims are white. He left a note in his car about a 2015 shooting massacre by the white supremacist, Dylann S. Roof, at a South Carolina black church that left nine dead, and said that he planned to kill at least 10 white churchgoers in revenge, the deputy district attorney, Amy Hunter, said during the trial, The Associated Press reported.

About 50 people were in the Antioch, Tenn., church, the Burnette Chapel Church of Christ, at the time of the shooting. Mr. Samson, a legal resident of the United States who immigrated from Sudan in the 1990s, had attended the church a year or two before the shooting, the police said.

Less than an hour before the shooting, three cryptic posts were made in quick succession on a Facebook page associated with him.

“You are more than what they told us,” read one.

Four minutes later: “Become the creator instead of what’s created. Whatever you say, goes.”