The Trump administration said on Sunday that people from Ukraine and Sudan would be able to keep their temporary humanitarian protections for now, allowing them to continue living in the United States.

Temporary Protected Status, a program meant to help foreign nationals who cannot safely return home because of armed conflict or natural disasters in their countries, was set to expire for about 100,000 Ukrainians and about 1,800 Sudanese on Monday.

The Homeland Security Department said that an announcement on the future of both programs would be “made at the appropriate time” and that people covered by them would be protected until then. But the department did not provide more information on the timing of the announcement.

Ukraine is nearly five years into a war that has battered the country, and civilian casualties have hit the highest levels since the beginning of the full-scale invasion by Russia. Sudan is in the middle of a devastating civil war that has engulfed the country for more than three years, leading to a severe food crisis.

The decision to hold off making an announcement mirrored a similar move by the Trump administration last month to allow people from El Salvador to keep their deportation protections for now. Since then, no announcement has been made and more than 170,000 Salvadorans have been left in limbo.

The moves notably diverge from the Trump administration’s previous attempts to swiftly dismantle T.P.S. programs as part of its broader campaign to restrict immigration, ending the protections for 13 of the 17 countries once covered. They also sharply differ from the administration’s treatment of about 350,000 Haitians who lost their temporary deportation protections this summer, despite ongoing unrest in their country. In a barrage of social media posts, homeland security officials cheered on deportation flights to Haiti.

But President Trump’s aggressive immigration crackdown has become a political problem for Republicans ahead of the midterm elections on Nov. 3, and his party is at risk of losing control of one or both chambers of Congress. The decision to keep the protections for Ukrainians also comes as tensions between Mr. Trump and President Volodymyr Zelensky of Ukraine have erupted over Mr. Trump’s thawing relationship and deal-making with Moscow, raising questions about the future of U.S. support for Ukraine.

This month, the United States lifted sanctions on Russian diesel exports that were first put in place to limit Moscow’s ability to finance the war. On Friday, Mr. Trump signed an order exempting Russia from new sanctions approved by Congress that were intended to target Russian officials, oligarchs and financial institutions.

Mr. Trump’s efforts stem from concerns that high fuel prices could hurt Republicans in the midterms. He has demanded that Ukraine stop striking Russian oil refineries so that Moscow can send more diesel to global markets. But Mr. Zelensky said last week that he would resume the strikes after Russia refused to halt its own attacks on Ukraine’s energy infrastructure, defying Mr. Trump.

The Trump administration’s decision to keep the deportation protections, at least for now, is a sign that the United States is still committed to providing some assistance for Ukrainians.

Kate, a recent high school graduate in Nebraska, said she was glad that T.P.S. would not immediately end for Ukrainians. She said that she fled the country with her mother and brother four years ago, and that the program had allowed them to live in the United States.

But Kate, who agreed to be interviewed on the condition that only her first name be used because she fears being targeted by immigration agents, said she worried that the United States could still terminate the protections before the war ended.

She recalled living in a bomb shelter shortly after the war broke out and frequently hearing rockets fly over her hometown. “I’m very scared to go back,” she said. “Nobody’s safe there.”

The administration’s decision to hold off making an announcement about the programs was also criticized by some former homeland security officials who said the moves created uncertainty for families and employers across the country.

“In light of the armed conflicts that continue in Ukraine and Sudan, extending T.P.S. is the right decision,” said Royce Murray, an assistant secretary at the Homeland Security Department during the Biden administration. “But the lack of clarity about the decision — including for how long T.P.S. will last — creates incredible instability for T.P.S. holders and the employers who rely on them.”

Hamed Aleaziz contributed reporting.