MIAMI — More than seven years after an earthquake shattered Haiti’s capital, the secretary of Homeland Security, John F. Kelly, announced Monday that he would grant 58,700 Haitians another six months to live and work in the United States.

The Haitians, who were visiting the United States or living here illegally when the earthquake hit, are part of a program called Temporary Protected Status that was made available to them after the earthquake, when conditions in Haiti were deemed too dangerous for them to return. On Monday, Mr. Kelly extended the program for six months, concluding that while Haiti was still not ready to absorb the citizens, a longer extension was not needed, senior Homeland Security officials said.

“Haiti has made progress across several fronts since the devastating earthquake in 2010,” Mr. Kelly said in a news release. “The Haitian economy continues to recover and grow, and 96 percent of people displaced by the earthquake and living in internally displaced person camps have left those camps.”

Mr. Kelly said he would re-evaluate conditions in six months to decide whether to allow the Haitians in the program to stay longer in the United States. But he injected a note of caution, saying they should begin preparing to return to Haiti in case their special designation ends on Jan. 22, 2018. On that day, Haitians would be vulnerable to deportation unless they had proper documentation.

Congress created the Temporary Protected Status program in 1990 to be temporary, but some designations have stretched as long as two decades.

A bipartisan group of lawmakers and many faith-based groups had hoped for a longer extension. Since the 2010 earthquake, Haiti has been hit hard by cholera, drought, floods and Hurricane Matthew, which wiped out crops, livestock, homes and roads along Haiti’s southwestern coast last year. The Haitian ambassador and foreign minister had also lobbied for more time. They met with Mr. Kelly last week.

“While this news will give the tens of thousands of Haitians anxiously waiting to learn the program’s fate some measure of relief, this is in fact a cup-half-full situation,” said Representative Frederica S. Wilson, a Democrat whose district in South Florida is home to many Haitians. “The reality is that in six months, Haiti will still be in no position to absorb and aid 58,000 unemployed people.”

Paul G. Altidor, the Haitian ambassador, said the Haitian government would continue to lobby Mr. Kelly and the White House in the next six months to grant Haiti more time to prepare for the migrants’ return. Mr. Altidor said he and Foreign Minister Antonio Rodrigue had made it clear, both in the meeting and in a letter, that they wanted an 18-month extension. The country is heavily dependent on money sent by Haitians in the United States, which is crucial to its recovery, he said.

The Homeland Security news release on Monday said the Haitian government had expressed to Mr. Kelly a “desire to welcome the safe repatriation of Haitian T.P.S. recipients in the near future.”

Mr. Altidor said that statement was inaccurate.

“The conversation that we had was not ‘let’s do this for six months’ because we wanted them returned in six months,” he said. “The worst thing that could have happened was for them to discontinue the program and shut it down. But we wanted 18 months. We put it on paper and discussed it with Secretary Kelly and others. Perhaps he misspoke.”

Haitians are the first of 10 groups in the program who are being re-evaluated before their special protections expire. The designations for South Sudan and Sudan expire in November. After that, it will be Honduras, Nicaragua and El Salvador, the countries with the largest number of people registered for the program.

Senior Homeland Security officials said the decision on whether to extend the protections for Haitians was rooted in conditions related to the earthquake, not to subsequent misfortunes. Traditionally, agency officials have routinely granted extensions, including to Haitians.

But this may no longer be the case.

“Secretary Kelly is taking a look at the T.P.S. program with a fresh set of eyes,” one official said.