Stocks surged on Friday after the Federal Reserve chairman, Jerome H. Powell, said the central bank’s approach to monetary policy would remain flexible in the face of market turbulence and signs that the global economy is slowing.

The S&P 500 rose 3.4 percent, while the Nasdaq composite ended up 4.3 percent. Stocks were already higher before Mr. Powell’s comments, rising off Labor Department figures that showed robust gains in hiring, but the rally picked up speed after he spoke Friday morning.

The Fed’s plans for future interest rate increases have become a concern for investors as stocks have stumbled in recent months. Markets slumped last month after the central bank raised rates and policymakers suggested it would continue on a course of tightening its monetary policy. Mr. Powell, acknowledging the market’s concerns that rising interest rates would dampen the economy, said the central bank could adjust its plans if conditions warrant.

[Read more about Mr. Powell’s comments.]

Stock investors have been looking for fresh evidence about the state of the economy, and on Friday they got a sign that it remains in good health. Employers in the United States added 312,000 jobs last month, well above Wall Street’s expectations and the biggest monthly gain since February.