WASHINGTON/ANKARA, Oct 23 (Reuters) - President Donald Trump said on Tuesday Saudi authorities staged the "worst cover-up ever" in the killing of prominent journalist Jamal Khashoggi this month, as the United States vowed to revoke the visas of some of those believed to be responsible.

Trump spoke hours after Turkey's president, Tayyip Erdogan, dismissed Saudi efforts to blame Khashoggi's death on rogue operatives. Erdogan urged Riyadh to search "from top to bottom" to uncover those behind Khashoggi's death in the Saudi consulate in Istanbul on Oct. 2, an incident that has sparked global outrage and strained relations between Riyadh and Washington.

For Saudi Arabia´s allies, the question will be whether they believe that Crown Prince Mohammed bin Salman, who has painted himself as a reformer, has any culpability.

Trump said the killing and subsequent cover-up by Saudi Arabia were "a total fiasco."

"There should have never been an execution or a cover-up, because it should have never happened," Trump told reporters. He said he had spoken on Monday with the crown prince who denied having anything to do with Khashoggi's killing.

Earlier, Trump said the Khashoggi matter was handled badly by Saudi officials.

"Bad deal, should have never been thought of. Somebody really messed up. And they had the worst cover-up ever," Trump told reporters at the White House.

Khashoggi, a critic of the crown prince, was a U.S. resident and Washington Post columnist.

Trump's comments in recent days have ranged from threatening Saudi Arabia with "very severe" consequences and mentioning possible economic sanctions, to more conciliatory remarks highlighting the country's role as a U.S. ally against Iran and Islamist militants, as well as a major purchaser of U.S. arms.

Trump did not give his views on who was ultimately responsible. But Secretary of State Mike Pompeo said the United States had identified some of the Saudi government and security officials it believed were involved in Khashoggi's murder and would take appropriate actions including revoking U.S. visas.

The U.S. State Department said 21 Saudis would have their visas revoked or be made ineligible for U.S. visas. Another official said the vast majority of the group had U.S. visas.

"As we continue to develop our understanding of the individuals that were responsible for this, not only those who executed it but those who were connected to it, the world should know that we intend to hold those individuals accountable when we develop this fact set," Pompeo told reporters.

Pompeo also said the State Department was looking into whether sanctions could be applicable for those found to be involved.

"These penalties will not be the last word on this matter from the United States," Pompeo said, although he emphasized as have other senior U.S. officials, the importance of the U.S.-Saudi relationship. "Neither the president nor I are happy with this situation."

The Saudi Embassy in Washington did not respond to a request for comment on the U.S. measures.

As the crisis unfolded over the past three weeks, Saudi Arabia changed its tune on Khashoggi. Riyadh initially denied knowledge of Khashoggi's fate before saying on Saturday he was killed in a fight in the consulate, an account met with skepticism from several Western governments, straining their relations with the world's biggest oil exporter.

Saudi Arabia has detained 18 people and dismissed five senior government officials as part of an investigation into Khashoggi's death. One of those fired includes Saud al-Qahtani, a top aide who ran social media for Prince Mohammed. According to two intelligence sources, Qahtani ran Khashoggi's killing by giving orders over Skype.

Turkish security sources say that when Khashoggi entered the consulate, he was seized by 15 Saudi intelligence operatives who had flown in on two jets just hours before.

ERDOGAN VOW

Erdogan on Tuesday stopped short of mentioning the crown prince who some U.S. lawmakers suspect ordered the killing.

"The Saudi administration has taken an important step by admitting to the murder. From now on, we expect them to uncover all those responsible for this matter from top to bottom and make them face the necessary punishments," Erdogan said in a speech in parliament.

"From the person who gave the order, to the person who carried it out, they must all be brought to account," Turkey's president said.

Turkish sources have said that authorities have an audio recording purportedly documenting the killing. Erdogan made no reference to any audio recording.

A Saudi Cabinet meeting chaired by King Salman said Riyadh would hold to account those responsible for the killing and those who failed in their duties, whoever they were.

Turkish investigators searched a Saudi consulate vehicle in Istanbul that contained two suitcases and other items, according to broadcaster CNN Turk. It was not clear what was in the suitcases.

'BRUTAL MURDER'

Trump said he would work with the U.S. Congress to determine the U.S. response to the Khashoggi matter.

"In terms of what we ultimately do, I'm going to leave it very much - in conjunction with me - up to Congress," Trump said, adding he would like a bipartisan recommendation.

CIA Director Gina Haspel, in Turkey to investigate the death of Khashoggi, has sought to hear the purported audio recording of his torture and murder, four sources familiar with her mission told Reuters on Tuesday.

A host of Western executives and governments have pulled out of a high-profile Saudi investment summit that started on Tuesday because of the Khashoggi affair.

Erdogan said the killing was planned from when Khashoggi, 59, first went to the Saudi consulate in Istanbul on Sept. 28 to obtain documents necessary for his marriage. He was told he would need to return later to collect the documents.

A day before Khashoggi's death, agents arrived from overseas and began to scout locations, including the Belgrad Forest near Istanbul and the city of Yalova to its south, Erdogan said. Police have searched both areas for evidence of Khashoggi's remains, Reuters has reported.

On the day Khashoggi arrived for his appointment and was later killed, the hard disk in the consulate's camera system was removed, Erdogan said.

"Covering up a savage murder like this will only hurt the human conscience. We expect the same sensitivity from all parties, primarily the Saudi Arabian leadership," he said.

"We have strong signs that the murder was the result of a planned operation, not a spontaneous development."

(Reporting by Jeff Mason in Washington and Gulsen Solaker in Ankara; Additional reporting by Tuvan Gumrukcu in Ankara, Ezgi Erkoyun, Daren Butler, Ali Kucukgocmen and Sarah Dadouch in Istanbul and Jonathan Landay and Susan Heavey in Washington; Writing by Alistair Bell; Editing by Yara Bayoumy, Will Dunham and Peter Cooney)