The U.S. economy added 304,000 jobs in January, shaking off the partial government shutdown with a surprisingly robust hiring surge, federal economists reported Friday. The unemployment rate crept up to 4 percent, capturing the toll of furloughed employees who temporarily stopped clocking in.

The strong January numbers come despite the 35-day closure that halted the wages of roughly 800,000 federal workers and benched more than a million contractors who prepare meals and clean and guard public buildings. Analysts had expected to see only 170,000 new positions.

“The economy’s got so much momentum that it’s just shrugging off all these other issues,” said Josh Wright, chief economist at iCIMS, a hiring software firm.

The U.S. private sector appeared to chug along at an especially healthy pace, and the country smashed through an important milestone: January was the 100th straight month of job growth since 2010.

Leisure and hospitality, health care, construction and transportation and warehousing all saw strong gains. The private-sector grew by 296,000 new positions, while public payrolls experienced an increase of 8,000.

This reflected hiring of state and local government workers. Federal government employment held steady in January. Furloughed employees were counted as employed in the survey because are slated to receive pay for the period that included the 12th of the month.

The average worker’s hourly earnings climbed by 85 cents, or 3.2 percent since January 2018 — the same solid growth rate from December.

“I think we’re in great shape right now,” Larry Kudlow, Trump’s top economic advisor, said Friday on Fox Business. “The USA is still the hottest economy in the world.”

“January’s Job Report demonstrated the strength of the American economy, with 304,000 jobs added as private sector job creation continued to surge despite the partial government shutdown,” Labor Secretary Alexander Acosta said in a statement.

The president also praised Friday’s numbers on Twitter.

But America’s jobless ranks edged up.

“The impact of the partial federal government shutdown contributed to the uptick,” the BLS researchers wrote Friday, noting that the number of people who reported being temporarily laid-off jumped by 175,000.

The number of people who said they were employed part-time for economic reasons spiked by 490,000 to 5.15 million — 11 percent higher than December’s figures, the data show.

“Contractors and people doing work related to the government didn’t get paid during the time period and had to find other work,” said Becky Frankiewicz, president of ManpowerGroup North America.

Last month’s Labor Department figures followed a budget stalemate between President Trump and congressional Democrats over Trump’s push for a wall on the U.S.-Mexico border. The showdown ended Jan. 25, with the president agreeing to reopen the government for three weeks while lawmakers keep negotiating.

A report from the Congressional Budget Office this week forecast the shutdown would lower America’s gross domestic product by $3 billion in the fourth quarter of 2018 and $8 billion for the first quarter in 2019. The economy will grow about $8 billion faster in the next two quarters than it would have otherwise, muting the shutdown’s lasting damage.

“We know there was a toll taken from the partial shutdown,” said Mark Hamrick, senior economic analyst at “But the underlying tone of the economy remains firm.”

Paychecks have been steadily climbing, and more people are looking for work. Job vacancies have topped the number of available applicants for months.

The unemployment rate hit 3.9 percent last April, the lowest level in 19 years, as companies cast a wider net for recruits.

The shutdown got close to inflicting serious damage on this progress, but ultimately, businesses behaved as if it would end quickly, said Mark Zandi, chief economist at Moody’s Analytics. They kept hiring.

“Policymakers got pretty close to going over that cliff,” he said, “but they didn’t.”

The consumer confidence index, however, dropped to an 18-month low in January, from 126.6 to 120.2, according to the Conference Board. Economists who monitor that indicator did not expect such a plummet, which suggested that the chaos in Washington was dampening moods nationwide.

Lynn Franco, senior director of economic indicators at the Conference Board, said in a statement that the slip appeared to be more of a “temporary shock” than a “precursor to a significant slowdown.”

Heather Long contributed to this report.