WASHINGTON — Just 10 days before a key meeting on Ukraine, President Trump met, over the objections of his national security adviser, with one of the former Soviet republic’s most virulent critics, Prime Minister Viktor Orban of Hungary, and heard a sharp assessment that bolstered his hostility toward the country, according to several people informed about the situation.

Mr. Trump’s conversation with Mr. Orban on May 13 exposed him to a harsh indictment of Ukraine at a time when his personal lawyer was pressing the new government in Kiev to provide damaging information about Democrats. Mr. Trump’s suspicious view of Ukraine set the stage for events that led to the impeachment inquiry against him.

The visit by Mr. Orban, who is seen as an autocrat who has rolled back democracy, provoked a sharp dispute within the White House. John R. Bolton, then the president’s national security adviser, and Fiona Hill, then the National Security Council’s senior director for Eurasian and Russian affairs, opposed a White House invitation for the Hungarian leader, according to the people briefed on the matter. But they were outmaneuvered by Mick Mulvaney, the acting White House chief of staff, who supported such a meeting.