By the spring of 2013, he had earned hundreds of thousands of dollars in search engine optimization, drawing traffic to websites in exchange for commissions. He was raised in a poor family, and planned to buy his mother a house in England.

But he was troubled. Painfully uncomfortable in social settings, he drank heavily and used drugs, he said. That year, he flew from England to Arizona to enter a rehabilitation clinic for acute anxiety, he said. In the clinic, he met a woman named Michelle, another patient.

“We had such a strong connection, it was unbelievable,” he said. “I loved her deeply.”

But the relationship ended a couple of weeks after they left rehab, when Michelle overdosed on pills and returned to the clinic. She broke it off with Mr. Rice. He said he agreed it was for the best.

“I was moving on with my life,” he said. He came to New York and found a bed in the McKibbin lofts in East Williamsburg, Brooklyn, two former warehouses filled with makeshift apartments that are often likened to a rowdy dormitory for young newcomers.

Depressed one day in August, he walked over the Williamsburg Bridge to Manhattan and spotted a psychic shop on Delancey Street. “And I went in,” he said. (In a previous written statement to the police about this day, Mr. Rice claimed to have visited a psychic in Times Square. In fact, he said on Thursday, he was on Delancey. His Times Square encounter was still two months away.)

He met a psychic named Brandy. “She knew a lot of stuff,” he said. Stuff about him. “‘I saw that you were connected to this girl,’” she told him.

He told her about Michelle. “She said, ‘If you could choose, would you want to be back with her?’ ” he said.