(CNBC) Stocks fell on Friday and posted weekly losses as investors digested a slew of corporate earnings reports and remarks from a top Federal Reserve official.

The S&P 500 closed 0.6% lower while the Nasdaq Composite slid 0.7%. The Dow Jones Industrial Average fell 67 points, or 0.3%, after rising more than 100 points earlier in the session. The indexes lost most of their earlier gains after Iran said it captured a British oil tanker.

For the week, the S&P 500 and Nasdaq fell more than 1% each, notching their biggest weekly loss since late May. The Dow lost 0.6%. The indexes’ losses come after reaching all-time highs earlier this week.

Note: Read our discussion guidelines before commenting.