For all things Paris, President Donald 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, as Mr. Trump visits the city Thursday for his first time as president, it’s unlikely that Jim will be tagging 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 is on the trip.

Mr. Trump repeatedly talked about the enigmatic Jim while on the campaign trail, but his friend didn’t receive widespread attention until Mr. 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 Mr. Trump speech in February at the Conservative Political Action Conference in Maryland. Mr. 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.”

To @realDonaldTrump and his friend Jim, in @LaTourEiffel we celebrate the dynamism and the spirit of openness of #Paris with Mickey & Minnie pic.twitter.com/VdIq3uWkO3 — Anne Hidalgo (@Anne_Hidalgo) February 24, 2017

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 travellers from six Muslim-majority nations as well as refugees.

Mr. Macron is an outspoken critic of discriminatory policies against France’s Muslim population. He favours 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 Mr. 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 counter-terrorism 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.”