After the U.S. levied tariffs on $34 billion worth of Chinese goods, China retaliated with similar tariffs on U.S. goods. (Spencer Platt/Getty Images)

A strong jobs report Friday pushed stocks to a positive note despite the first real shots across the bow in a trade war between the United States and China.

The Dow Jones industrial average climbed during the holiday-shortened first week of July, its first positive stretch in three weeks. The Dow closed at 24,456, up 0.4 percent, propelled mostly by technology shares.

The Standard & Poor’s 500-stock index closed at 2,759, up 0.85 percent, and the tech-heavy Nasdaq finished up a healthy 1.34 percent, closing at 7,688.

The U.S. Labor Department’s closely watched jobs report issued Friday had Wall Street wags giddy. The U.S. economy added 213,000 jobs in June. And the unemployment rate went from 3.8 percent to 4 percent for June, while the number of people looking for jobs increased with an influx of women and teenagers that more than made up for the drop in labor force participation among men.

The good news dampened the threat of inflation and therefore stilled the fear that the Federal Reserve would need to act boldly by again raising interest rates.

Bull markets tend to turn into bear markets and cruising economies usually shrink into recessions when the Federal Reserve raises interest rates to quell inflation. But that does not appear to be a worry right now.

“It’s a Goldilocks economy,” said Phillip Swagel, an economics professor at the University of Maryland. “It’s hard to imagine a better jobs report.”

Jared Bernstein, who served as economic adviser to Vice President Joe Biden, called Friday’s labor results “pretty impressive.”

“The pace of jobs, wage and price gains suggest the Fed can keep tapping the brakes, not slamming them,” Bernstein said. “There’s more room to run. The unemployment number can go down even further without triggering spiraling inflation. Based on all of that, you might have expected a bigger market splash from this report. But trade pressures are pushing the other way.”

Many Wall Streeters had pointed to July 6 as the trade war D-Day. On Friday, the United States placed tariffs on $34 billion of imports from China. China responded with tariffs on 545 U.S. items. Russia also said it was imposing tariffs on U.S. products in answer to steel and aluminum tariffs. Import taxes of 25 to 40 percent will be applied to various American industrial goods, including those used in the construction and energy sectors, according to Maxim Oreshkin, Russia’s minister of the economy.

Many were expecting trade concerns to drown market glee.

But after a brief Friday-morning dip, markets rebounded on the jobs report, which showed 93 straight months of increases in private payrolls. Technology mostly led the Dow charge, with Microsoft, Intel and Apple breaking above 1 percent. McDonald’s and new member Walgreens were also strong.

“This is a cold war so far, not a hot one,” wrote Brad McMillan, chief investment officer for Commonwealth Financial Network. “This is still playing out at the political level. U.S. tariffs are big enough to make a point but small enough that the point is not yet an economic one. Likewise, the Chinese tariffs are designed to hurt, but they are targeted so the pain is political more than economic.”

Some said the week’s gains are somewhat misleading. Friday was the end of a trading week that was light because of the Fourth of July holiday and vacations that helped swing the market toward a strong tilt to the upside.

“Trading and actions were slow and noncommittal, as buying easily overpowered selling, so this week’s results, while nice, may not be a clear indication of sentiment,” said Howard Silverblatt, a senior index analyst with S&P Dow Jones Indices.

Don’t count on it to last, with all the external noise from tweets, oil prices and election-year politics — not to mention President Trump’s Supreme Court nominee expected to be unveiled this Monday — dominating the summer.

Silverblatt said market trading will intensify next week when people return from the holiday break and earnings season gets underway. The big banks — Citigroup, JPMorgan Chase and Wells Fargo — begin reporting next Friday, followed by 61 companies the next week.

Swagel said the most interesting tidbit from the jobs report may be that 601,000 Americans entered the labor force.

“Unemployment went up, but for the right reason,” Swagel said. “More people are looking for jobs. We have a sense that employers are looking at people they screened out in the past. That’s a good thing. We want people to have a chance to come back.