WASHINGTON — President Trump suggested on Wednesday that his administration had warned the Russian government to stay out of Venezuela after two Russian planes carrying military personnel arrived in Caracas this week, a move that places another significant obstacle in the White House’s slow-moving effort to oust President Nicolás Maduro.

During an Oval Office meeting with Fabiana Rosales, the wife of Juan Guaidó, the Venezuelan National Assembly politician recognized by the Trump administration and 50 other countries as the rightful interim president, Mr. Trump said that Russia needed to see its way out of the conflict.

“Russia has to get out. What’s your next question?” Mr. Trump told reporters.

In recent weeks, Russia has offered to send food and medicine to the Maduro government as the country deals with hyperinflation, widespread blackouts and skyrocketing poverty. American-led aid shipments, staged in nearby countries including Colombia and Brazil, have had less success making it across the country’s borders.

“They know,” Mr. Trump said when asked if he had conveyed to the Russians his feelings about their involvement in Venezuela. “They know very well.”