NEW YORK (Reuters) - The S&P 500 ended another turbulent week on an upbeat note Friday, but major indexes posted their worst week of losses since early February as President Donald Trump’s threat to impose import tariffs on steel and aluminum rattled investors.

The gains on Friday came as investors who had been spooked by the prospect of a global trade war backed off those concerns and noted a trade war was far from certain at this point.

Trump on Thursday threatened a 25 percent tariff on steel imports and 10 percent on aluminum without exemptions for any countries, igniting a selloff in a market already on edge over rising U.S. interest rates and bond yields.

Trump struck a defiant tone on Friday, saying trade wars were “good, and easy to win”, and U.S. Commerce Secretary Wilbur Ross, appearing on CNBC, said tariffs would have a “trivial effect.”

Phil Orlando, chief equity strategist at Federated Investors in New York, said Trump’s announcement was made to call everyone’s attention to the U.S. trade deficit but investors decided that a full-blown global trade was not going to happen.

“For a real estate guy like that, you pound the podium, you rattle some sabers, you get everybody’s attention and then you negotiate back to some reasonable midpoint.”

The tariffs could dampen profits for everything from car makers to beer companies and result in higher prices for consumers.

Shares of big U.S. steel companies and manufacturers were under pressure on uncertainty over the effects of tariffs.

Shares in Caterpillar CAT.N, a buyer of raw materials and a big exporter of construction machinery products, were down 2.6 percent after falling 2.8 percent in the previous day's session. General Motors GM.N was down 1 percent.

The Dow Jones Industrial Average .DJI fell 70.92 points, or 0.29 percent, to 24,538.06, the S&P 500 .SPX gained 13.58 points, or 0.51 percent, to 2,691.25 and the Nasdaq Composite .IXIC added 77.31 points, or 1.08 percent, to 7,257.87.

For the week, the S&P 500 dropped 2 percent, while the Dow was down 3 percent and the Nasdaq fell 1 percent. Wall Street had posted gains in the previous two weeks as it recovered from its steep early-February selloff.

Those losses in early February pushed the S&P 500 down more than 10 percent from a Jan. 26 record high, confirming the market was in a correction.

The tariffs are unlikely to significantly hurt Corporate America’s overall earnings, according to stock market strategists, who were not immediately adjusting their profit estimates following Trump’s announcement.

FILE PHOTO - Traders work on the floor of the New York Stock Exchange, (NYSE) in New York, U.S., February 26, 2018. REUTERS/Brendan McDermid

“The impact on total corporate earnings first would be driven by the impact on the economy,” said Keith Parker, U.S. equity strategist for UBS in New York.

McDonald's MCD.N dropped 4.8 percent after RBC lowered its price target on the stock and cut its 2018 earnings estimate, citing a disappointing early sales impact from McDonald's value menu. The stock was the biggest drag on the S&P and the Dow.

J.C. Penney Co Inc JCP.N shares fell 5.4 percent after the department store chain missed same-store sales estimates.

Advancing issues outnumbered declining ones on the NYSE by a 1.69-to-1 ratio; on Nasdaq, a 2.99-to-1 ratio favored advancers.

The S&P 500 posted one new 52-week high and 25 new lows; the Nasdaq Composite recorded 59 new highs and 65 new lows.

About 7.7 billion shares changed hands on U.S. exchanges. That compares with the 8.4 billion daily average for the past 20 trading days, according to Thomson Reuters data.