The S&P 500 index climbed to an all-time high Friday, just two days after the current bull market in stocks became the longest in history. The Nasdaq composite and the Russell 2000 indexes also closed at all-time highs following a broad rally led by technology and materials stocks.

On Friday:

The S&P 500 gained 17.71 points, or 0.6 percent, to 2,874.69, a record.

The Dow Jones Industrial Average rose 133.37 points, or 0.5 percent, to 25,790.35.

The Nasdaq added 67.52 points, or 0.9 percent, to 7,945.98, a record.

The Russell 2000 index of smaller-company stocks picked up 8.62 points, or 0.5 percent, to 1,725.67, a record.

For the week:

The S&P 500 rose 24.56 points, or 0.9 percent.

The Dow gained 121.03 points, or 0.5 percent.

The Nasdaq picked up 129.65 points, or 1.7 percent.

The Russell 2000 added 32.72 points, or 1.9 percent.

For the year:

The S&P 500 is up 201.08 points, or 7.5 percent.

The Dow is up 1,071.13 points, or 4.3 percent.

The Nasdaq is up 1,042.58 points, or 15.1 percent.

The Russell 2000 is up 190.16 points, or 12.4 percent.