Wall Street Bull bronze sculpture in the Financial District in Manhattan

U.S. employers dramatically stepped up their hiring in December, adding 312,000 jobs in an encouraging display of strength for an economy in the midst of a trade war, slowing global growth and a partial shutdown of the federal government.

Economists had forecast a monthly addition of 180,000 jobs, and payroll processor ADP reported earlier this week an addition of 271,000 jobs for December.

The U.S. Labor Department reported on Friday that the unemployment rate rose slightly to 3.9%, but that reflected a surge in jobseekers — a positive for growth.

Average hourly pay improved by 3.2% from a year ago, up from average wage growth of 2.7% at the end of 2017.

The jolt in hiring offers a dose of reassurance after a tumultuous few months as the outlook from the financial markets has turned decidedly bleaker. Job growth at this pace is a sign that the economy will continue to expand for a 10th straight year, even if overall growth slows somewhat because of the waning stimulus from President Donald Trump’s tax cuts.

“The labour market is very strong even though the economy appears to be slowing,” said Eric Winograd, senior U.S. economist at the investment management firm AllianceBernstein. “Those two things cannot coexist for very long. Either weakening demand will lead firms to dial back the pace of hiring or the robust pace of hiring will lead firms to ramp back up production.”

Stocks jumped Friday in response to the jobs figures. The Dow Jones industrial average climbed by roughly 450 points in morning trading, an increase of about 2%.

But in recent weeks, financial markets have been increasingly worried about the path of economic growth this year.

Major companies such as Apple Inc. say their sales are being jeopardized by the tariff-fuelled trade war between the U.S. and China. Factory activity in China and the U.S. have both weakened, with the Institute for Supply Management’s U.S. manufacturing index on Thursday posting its steepest decline in a decade.

The government is about to enter its third week of a partial shutdown, with negotiations stalled over President Trump’s insistence that Democrats agree on funding for a wall along the Mexico border. And attacks by Trump on the Federal Reserve Board concerning its interest rate increases have raised doubts about Chairman Jay Powell’s status — a concern for both the markets and the economy.

The expected continuation of steady job growth suggests that such risks might be — for the moment, anyway — overblown. However, the stock market will have to weigh whether the strong job growth encourages the Fed to hike rates in 2019 more frequently than investors had previously anticipated.

Despite the strong jobs data, the U.S. economy faces headwinds, said Canadian Imperial Bank of Commerce economist Katherine Judge in emailed commentary, such as a slower housing market and softer global demand. These will partly offset any bump to consumption in the first quarter stemming from the increase in jobs, which should be enough to keep the Fed from hiking rates in the first quarter unless robust data readings continue, she said.

President Trump called the jobs growth “GREAT” on Twitter. But Kevin Hassett, chairman of the White House Council of Economic Advisers, told reporters on Thursday that the next jobs report for January could be weak if the partial government shutdown continues.

There could be hundreds of thousands of government workers who could say they’re not working, which would lower the job totals.

“So, when we see the January jobs number, it could be a big negative,” said Hassett, even though those workers would be paid back wages once the government fully reopened.

The health-care, food services, construction and manufacturing sectors were the primary contributors to last month’s hiring.

Health care and education services added 82,000 jobs in December, the biggest jump since February 2012. Restaurants and drinking placed posted a net gain of 40,700 jobs. Builders added 38,000 construction jobs, while manufacturers increased their payrolls by 32,000 workers.

Businesses are still searching for more workers. The employment site Glassdoor found that job postings have risen by 17% in the past year to 6.7 million.

“We really don’t see any slowdown yet,” said Andrew Chamberlain, chief economist at Glassdoor.

Despite the increase in the unemployment rate, the influx of people searching for work coupled with the job gains is an indication that the rate should decline in the coming months. Economists estimate that it requires roughly 100,000 job gains each month to satisfy population growth and keep the unemployment rate at its current level.

Hiring has easily eclipsed that pace. In 2018 employers added 2.6 million jobs, or an average of nearly 217,000 a month, according to the Labor Department.

At some point, even if the economy remains healthy, monthly job gains will likely downshift to a more gradual pace. This is because there is a dwindling pool of unemployed people searching for work after several years of solid hiring. There were 6.3 million people looking for a job in December, down from 6.5 million a year ago.

“People should not get used to numbers like the one we saw this month,” said Martha Gimbel, director of economic research at the jobs website Indeed. “Eventually, job growth is going to start slowing down. When that happens, we shouldn’t panic.”