DAMIAN J. TROISE and ALEX VEIGA - AP Business Writers

NEW YORK (AP) -- Stocks gave up an afternoon gain and ended slightly lower on Wall Street Wednesday.

Energy companies helped pull the market lower after crude oil prices sank.

The S&P 500 fell 0.1%, the Dow Jones Industrial Average fell 0.2% and the Nasdaq lost 0.1%.

The price of U.S. crude oil fell 4%.

Investors closely watched testimony to Congress from Federal Reserve Chair Jerome Powell. He reaffirmed the central bank's determination to raise interest rates and slow inflation.

Bond yields mostly fell. The yield on the 10-year Treasury note, which helps set mortgage rates, fell to 3.16%.