U.S. equities closed higher in choppy trade on Friday after Donald Trump took a protectionist tone in his first speech as president.

"We must protect our borders from the ravages of other countries making our products, stealing our companies, and destroying our jobs," Trump said after being sworn in. "Protection will lead to great prosperity and strength. I will fight for you with every breath in my body and I will never ever let you down."

The Dow Jones industrial average gained about 95 points after rising 111.54 points at session highs, with Procter & Gamble, Merck and IBM contributing the most gains. The blue-chips index also snapped a five-day losing streak.

"It was a very populist speech. He spoke to the Heartland; he spoke to those who voted for him," said Quincy Krosby, market strategist at Prudential Financial. "Clearly, it was not what a lot of people were expecting. It was vintage Trump.

The S&P 500 gained 0.3 percent, with telecommunications and materials leading advancers. The Nasdaq composite advanced 0.28 percent. The three major indexes had traded more than half a percent higher ahead of Trump's speech.

S&P intraday chart

Source: FactSet

"He didn't decide to go high. He decided to go populist and protectionist, and that's something we're going to have to get used to. When you put together populism and protectionism, it has a lot of economic fallout. That's how he got here," said aid Art Hogan, chief market strategist at Wunderlich Securities. "We were going higher on the hopes of thing that take time to happen in Washington."



The broader stock market has rallied significantly since Trump's shocking electoral victory on the hopes of more government spending, lower corporate taxes and deregulation of some sectors.



Stocks, however, have traded mostly sideways for the past month as investors look for more details about Trump's proposed policies.

The Trump administration will have to start delivering on these expectations for stocks to remain at current levels, said Naeem Aslam, chief market analyst at Think Markets. "Traders are no longer going to monitor his words closely, but the actual actions. The bigger question is if he can get the Congress to wear the same hat," he said.

Equities had pulled back slightly leading up to the inauguration, with the benchmark indexes all tracking for weekly losses heading into Friday's session.