A police officer enters the Saudi consulate in Istanbul, Turkey — the last place that prominent Saudi journalist Jamal Khashoggi was seen entering before he disappeared on Oct. 2, 2018.

Police who searched the Saudi Consulate in Istanbul found evidence that Saudi writer Jamal Khashoggi was killed there, a high-level Turkish official said Tuesday, as authorities prepared to search the consul's residence nearby after the diplomat left the country.

Security forces began setting up barricades in front of the residence just hours after Consul Mohammed al-Otaibi flew out of the country on a 2 p.m. flight, state media reported. Saudi Arabia did not immediately acknowledge the consul left the country, two weeks after Khashoggi disappeared at the diplomatic post he ran.

Meanwhile, U.S. Secretary of State Mike Pompeo smiled and shook hands during meetings in Riyadh with Saudi King Salman and his son, Crown Prince Mohammed bin Salman, whom Khashoggi wrote critically about in The Washington Post while in self-imposed exile in America.

Saudi officials have called Turkish allegations that Saudi agents killed Khashoggi "baseless," but reports in U.S. media on Tuesday suggested the Saudis may acknowledge the writer was killed at the consulate, perhaps as part of a botched interrogation.

A high-level Turkish official told The Associated Press that police found evidence there of Khashoggi's slaying, without elaborating. The official spoke on condition of anonymity as the investigation was ongoing.

Police planned a second search at the Saudi consul's home nearby. Leaked surveillance footage show diplomatic cars traveled to the consul's home shortly after Khashoggi's disappearance at the consulate on Oct. 2.

In Riyadh, Saudi Foreign Minister Adel al-Jubeir greeted Pompeo when he landed. The former CIA chief didn't make any remarks to the media.

Soon after, Pompeo arrived at a royal palace, where he thanked King Salman "for accepting my visit on behalf of President (Donald) Trump" before the two went into a closed-door meeting.

Pompeo then met a smiling Prince Mohammed, the 33-year-old heir apparent to the throne of the world's largest oil exporter. Khashoggi fled Saudi Arabia and took up a self-imposed exile in the United States after the prince's rise, and had written columns critical of his policies.

"We are strong and old allies," the prince told Pompeo. "We face our challenges together — the past, the day of, tomorrow."

Trump, who dispatched Pompeo to speak to the monarch over Khashoggi's disappearance, said after talking with King Salman that the slaying could have been carried out by "rogue killers." Trump provided no evidence, but that statement appeared to offer the U.S.-allied kingdom a possible path out of a global diplomatic firestorm.

"The king firmly denied any knowledge of it," Trump told reporters Monday. "It sounded to me like maybe these could have been rogue killers. I mean, who knows? We're going to try getting to the bottom of it very soon, but his was a flat denial."

Left unsaid was the fact that any decision in the ultraconservative kingdom rests solely with the ruling Al Saud family.

"The effort behind the scenes is focused on avoiding a diplomatic crisis between the two countries and has succeeded in finding a pathway to deescalate tensions," said Ayham Kamel, the head of the Eurasia Group's Mideast and North Africa division.

"Riyadh will have to provide some explanation of the journalist's disappearance, but in a manner that distances the leadership from any claim that a decision was made at senior levels to assassinate the prominent journalist."

CNN reported that the Saudis were going to acknowledge the killing happened but deny the king or crown prince had ordered it — which does not match what analysts and experts know about the kingdom's inner workings.

The New York Times reported that the Saudi royal court would suggest that an official within the kingdom's intelligence services — a friend of Prince Mohammed — had carried out the killing. According to that reported claim, the crown prince had approved an interrogation or rendition of Khashoggi back to Saudi Arabia, but the intelligence official was tragically incompetent as he eagerly sought to prove himself. Both reports cited anonymous people said to be familiar with the Saudi plans.

Saudi officials have not answered repeated requests for comment over recent days from the AP.

Saudi officials have been in and out of the building since Khashoggi's disappearance without being stopped. Under the Vienna Convention, diplomatic posts are technically foreign soil that must be protected and respected by host countries.

Turkey has wanted to search the consulate for days. Permission apparently came after a late Sunday night call between King Salman and Turkish President Recep Tayyip Erdogan.

The Turkish inspection team included a prosecutor, a deputy prosecutor, anti-terror police and forensic experts, the state-run Anadolu news agency reported. Certain areas of the consulate were to remain off-limits, although officials would be able to inspect surveillance cameras, Turkish media reported.

Erdogan told journalists on Tuesday that police sought traces of "toxic" materials and suggested parts of the consulate had been recently painted, without elaborating.

On Tuesday, a Turkish Foreign Ministry official acknowledged police want to search the Saudi consul's home as well. The official, who spoke on condition of anonymity in line with government regulations, gave no timeline for the search.

Khashoggi has written extensively for the Post about Saudi Arabia, criticizing its war in Yemen, its recent diplomatic spat with Canada and its arrest of women's rights activists after the lifting of a driving ban for women. Those policies are all seen as initiatives of Prince Mohammed, the son of King Salman, who is next in line to the throne.

Prince Mohammed has aggressively pitched the kingdom as a destination for foreign investment. But Khashoggi's disappearance has led several business leaders and media outlets to back out of an upcoming investment conference in Riyadh.

Trump previously warned of "severe punishment" for the kingdom if it was found to be involved in Khashoggi's disappearance, which has spooked investors.

Trump's warning drew an angry response Sunday from Saudi Arabia and its state-linked media, including a suggestion that Riyadh could wield its oil production as a weapon. The U.S. president has been after King Salman and OPEC to boost production to drive down high oil prices, caused in part by the coming re-imposition of oil sanctions on Iran.