The Fox News host Bill O’Reilly distanced himself on Monday from a guest his show falsely identified last week as a “Swedish defense and national security adviser,” saying he should not have been invited to appear in a segment on immigrants and crime in Sweden.

The guest, Nils Bildt, appeared on The O’Reilly Factor last Thursday to support claims made by Mr. O’Reilly that immigration had led to an uptick in violent crime in Sweden. But according to Swedish officials and American court records, Mr. Bildt has no known ties to Sweden’s security establishment and has a criminal record of his own in the United States.

Mr. O’Reilly’s on-air remarks came after Mr. Bildt accused Fox of making up his official-sounding title and a parade of Swedish officials said they had never heard of him. He called criticism of Mr. Bildt “valid.”

“Mr. Bildt does consulting work on terrorism, that’s true — but we should have clarified that he had no direct role with the Swedish government,” Mr. O’Reilly said, according to a transcript of his remarks. “To be fair, the information we gave you in the segment was accurate but in hindsight a more relevant guest should have been used on the anti-immigrant side.”