WASHINGTON — When President Trump welcomed Malaysia’s prime minister, Najib Razak, to the White House on Tuesday, he thanked him for “all the investment you’ve made in the United States.”

Mr. Trump did not single out Mr. Najib’s patronage of his hotel two blocks from the White House, but he could have: the Malaysian leader was spotted entering and exiting the Trump International Hotel, with his entourage, on Monday and Tuesday.

The White House denied that Mr. Najib had picked the hotel at Mr. Trump’s behest. “We certainly don’t book their hotel accommodations,” the press secretary, Sarah Huckabee Sanders, said, “so I couldn’t speak to the personal decision they made about where to stay here in D.C.”

Whatever the motivation, the choice of lodgings added to the awkwardness of a meeting already replete with ethical questions. Mr. Najib is under investigation by the Justice Department, part of a corruption scandal that critics said he has fended off by firing investigators and dismissing negative news reports about him as “fake news.”