Signs that a solution to Greece's debt problems could be near helped the stock market eke out its first week of gains since April.
Germany softened its conditions for giving Greece more loans on Friday, putting Greece closer to getting more financial support and avoiding a default. Global financial markets were rattled earlier this week when a default by Greece seemed imminent.
The Dow Jones industrial average closed up 42.84, or 0.4 percent, at 12,004.36.
The Standard & Poor's 500 index rose 3.86, or 0.3 percent, to 1,271.50.
The Nasdaq composite index lost 7.22, or 0.3 percent, to 2,616.48
For the week:
The Dow is up 52.45, or 0.4 percent.
The S&P is up 0.52, or less than 0.1 percent.
The Nasdaq is down 27.25, or 1 percent.
For the year to date:
The Dow is up 426.85, or 3.7 percent.
The S&P is up 13.86, or 1.1 percent.
The Nasdaq is down 36.39, or 1.4 percent.