Persuading international travelers to visit the United States never used to be difficult. But things have gotten a little more complicated.

According to the Commerce Department’s National Travel and Tourism Office, the number of international visitors in the first half of 2017 fell 4 percent from a year earlier. Those in the travel industry point to factors like a global market that gives tourists more possible destinations, the strength of the dollar and tightening visa restrictions.

They also say the messages coming from the Trump administration — the latest example being President Trump’s vulgar comment about Haiti and African nations — play a role.

“Although the policy of the administration has not been targeted towards tourists, per se, tourists around the world are asking themselves whether they’re welcome in the United States,” said Daniel Korschun, associate professor of marketing at Drexel University, who focuses on the intersection of advertising and politics. “That’s surely a factor in the sagging performance.”