ISTANBUL — Jamal Khashoggi, a Saudi journalist whose writings had jabbed his country’s leaders, seemed at ease in the days before he disappeared after visiting Saudi Arabia’s Consulate here, unconcerned about being tracked by government spies and peripatetic, as always, despite battling a cold.

In London, where he attended a conference, he shrugged off an offer to stay at a low-profile hotel, rather than one booked by the organizers. During a lunch break, he left his cellphone unguarded on the table so carelessly that a friend felt the need to keep an eye on it.

Khashoggi seemed mostly focused on the future, his friend Azzam Tamimi said, talking about writing his third book and his excitement about his upcoming wedding. Tamimi said that Khashoggi told him about the appointment at the Saudi Consulate in Istanbul on Tuesday morning; he had to prove that he was divorced so that he could marry again.

Opinion | Jamal Khashoggi, a Saudi journalist, criticized his home country. Then he was reportedly killed. (Adriana Usero, Jon Gerberg/The Washington Post)

“He said not to worry, he was very optimistic. He said he had been treated well in a previous visit to the consulate,” Tamimi said. “He was welcomed warmly, very warmly, he said. They promised him his papers. He told me the staff at the consulate were just ordinary people. He wouldn’t have a problem.”

What happened after Khashoggi entered the consulate is a mystery. Over the past two days, Turkish officials have said they believe that Saudi agents killed him shortly after he arrived. The allegations — including that a team of men was brought from Saudi Arabia to kill him — have reverberated around the world, shocked his friends and terrified other critics of the Saudi government.  

Saudi Arabia has vigorously denied the accusations, saying Khashoggi left the consulate on his own. A Saudi spokesman pointed out that Khashoggi had visited the Saudi Embassy in Washington several times in the past and “never faced any issues while doing so.”

His friends say the cordial visits to the Saudi Embassy may have provided Khashoggi with a false sense of security. He also lacked the protective reflexes of a dissident: Khashoggi had spent his career as a part of Saudi Arabia’s establishment, ensconced in its ruling circles, and had only recently come to be regarded as a critic of the country’s leadership.  

And as he traveled to Istanbul in early September, he was pre­occupied with his impending marriage to Hatice Cengiz, a Turkish woman he had met a few months earlier, and was mulling a more permanent move that would split his time between Turkey and the United States, friends said.

On Sept. 28, he visited the Saudi Consulate and was told to come back the following week to pick up his paperwork, his friends said. He left Istanbul that afternoon and flew directly to London, where he spoke at a one-day conference on Sept. 29 hosted by the Middle East Monitor, a nonprofit press-monitoring organization that focuses on Israeli-Palestinian issues.  

Daud Abdullah, director of the group, said in an interview that he knew Khashoggi was under “a lot of pressure from the Saudi regime,” and Abdullah inquired whether Khashoggi might feel more comfortable at a discreet hotel, not the one booked by the conference.

But Khashoggi said the original arrangement was fine and spent Friday evening through Monday afternoon at the Ambassadors Hotel in central London.

“He felt pretty comfortable, on the whole,” Abdullah said.

The conference, “Oslo at 25: A Legacy of Broken Promises,” focused on the Israel-Palestinian conflict, the Israeli military occupation and the diplomatic failure to create two states. 

In his remarks, Khashoggi spoke about how Saudi Arabia’s improving relations with Israel had recently cooled. He stressed that it should be the Palestinians who decide their future, not Egypt or Saudi Arabia or other outside powers.

Khashoggi was very sick with a cold on Sunday and stayed at his hotel, said Tamimi, a British Palestinian lecturer and presenter on the satellite TV station ­al-Hiwar. 

On Monday, Khashoggi joined Tamimi at his offices in west London. They discussed meeting in Istanbul this week, when Khashoggi was to appear on Tamimi’s talk show Thursday. They went out to lunch.

 “He was excited.” Tamimi said. “He was getting married.”

Khashoggi returned to Istanbul on Monday, Cengiz and Khashoggi’s friends said. But about 1:30 p.m. Tuesday, when he was preparing to enter the consulate, the excitement and optimism his friends had sensed in London had been replaced by nagging concern that something might happen while he was inside, his fiancee said.

He left his phone with Cengiz, along with instructions that she should call a senior Turkish official if he did not emerge within a few hours.  

“He was worried,” she said. 

Booth reported from London.