For all things Paris, President Trump's go-to guy is Jim.

The way Mr. Trump tells it — Jim is a friend who loves Paris and used to visit every year. Yet when Mr. Trump travels to the city Thursday for his first time as president, it's unlikely that Jim will tag along. Jim doesn't go to Paris anymore. Mr. Trump says that's because the city has been infiltrated by foreign extremists.

Whether Jim exists is unclear. Mr. Trump has never given his last name. The White House has not responded to a request for comment about who Jim is or whether he will be on the trip.

Get Breaking News Delivered to Your Inbox

Mr. Trump repeatedly talked about the enigmatic Jim while on the campaign trail, but his friend didn't receive widespread attention until Trump became president. For Mr. Trump, Jim's story serves as a cautionary tale - a warning that even a place as lovely as Paris can be ruined if leaders are complacent about terrorism.

Jim's biggest moment in the spotlight was during a high-profile Trump speech in February at the Conservative Political Action Conference in Maryland. Trump explained that Jim "loves the City of Lights, he loves Paris. For years, every year during the summer, he would go to Paris. It was automatic, with his wife and his family."

Mr. Trump one day asked Jim: "How's Paris doing?"

"'Paris?" Jim replied, as relayed by Mr. Trump. "'I don't go there anymore. Paris is no longer Paris.'"

The mayor of Paris, Anne Hidalgo, responded by tweeting a photo of herself with Mickey and Minnie Mouse inviting Mr. Trump "and his friend Jim" to France to "celebrate the dynamism and the spirit of openness of #Paris."

France's then-Foreign Minister Jean-Marc Ayrault also took to Twitter, noting that 3.5 million American tourists had visited France last year.

The Jim story highlights differences on immigration between Mr. Trump and major European leaders, including Mr. Trump's host in Paris, French President Emmanuel Macron.

Mr. Trump has put immigration at the core of his anti-terrorism strategy. He proposed a Muslim ban during the campaign and is fighting in the courts to temporarily bar travelers from six Muslim-majority nations as well as refugees.

Macron is an outspoken critic of discriminatory policies against France's Muslim population. He favors strong external European Union borders and he's also called for a united European policy on immigration so that countries like Greece are not disproportionately affected by the influx of refugees.

Mr. Trump believes European policies fall short of any credible efforts to protect the public. He has vowed to push forward with a plan to build a wall along America's southern border with Mexico and he advocates for "extreme vetting" to "keep terrorists out."

Mr. Trump never endorsed Macron's election opponent, far-right candidate Marine Le Pen, but in an interview with The Associated Press, he noted that terrorist attacks in France would "probably help" her win since "she's the strongest on borders and she's the strongest on what's been going on in France."

Mr. Trump has criticized several European leaders, accusing them of lax counterterrorism policies. He lashed out at London Mayor Sadiq Khan after an attack on London Bridge last month. In a February speech, Mr. Trump denounced Sweden's policies and talked about "what's happening last night in Sweden." Swedish officials sought clarification because there were no known attacks in their country that night.

Mr. Trump took to Twitter to explain: "My statement as to what's happening in Sweden was in reference to a story that was broadcast on @FoxNews concerning immigrants & Sweden."