NEW YORK The S&P 500 ended at another record close on Friday but well off the day's highs as worries about tensions in Ukraine caused investors to take profits ahead of the weekend.
All three major indexes closed out the month with strong gains, however. The Dow scored its best monthly percentage gain since January 2013, while the S&P 500 had its best month since October.
Early in the session, the S&P 500 hit an intraday record for a second time this week as consumer confidence and other data bucked the recent trend of weaker economic reports.
But indexes turned negative after Ukraine's acting president accused Russia of open aggression and said Moscow was following a similar scenario to the one before it went to war with Georgia in 2008.
"There's chatter about Russia's (involvement) in the Ukraine, and that's getting people all jittery," said Michael James, managing director of equity trading at Wedbush Securities in Los Angeles. "It's sell first, and ask questions later on a Friday afternoon. You don't know what's going to happen over the weekend, so people are going to lock in profits."
The Nasdaq remained in negative territory for the session, and tech shares including Apple (AAPL.O) and Salesforce.com Inc (CRM.N) were among the biggest drags on the S&P 500.
The Dow Jones industrial average .DJI rose 49.06 points or 0.3 percent, to 16,321.71, while the S&P 500 .SPX gained 5.16 points or 0.28 percent, to 1,859.45, a record close. The S&P 500 hit an intraday record of 1,867.92.
The Nasdaq Composite .IXIC dropped 10.814 points or 0.25 percent, to 4,308.119.
For the month, the Dow rose 4 percent, the S&P 500 gained 4.3 percent and the Nasdaq advanced 5 percent. For the week, the Dow was up 1.4 percent, the S&P 500 was up 1.3 percent and the Nasdaq was up 1 percent.
Strong gains this week have come from retailers, with the S&P 500 retail index .SPXRT up 4.5 percent for the week following upbeat results from Home Depot (HD.N) and others.
Federal Reserve Chair Janet Yellen bolstered the market on Thursday when she said harsh weather seems to be to behind recent U.S. economic softness.
Also helping the market was data showing consumer sentiment rose more than expected, while the Chicago Purchasing Managers Index was also ahead of expectations. However, the U.S. government slashed its estimate for fourth-quarter economic growth.
Among the day's top percentage gainers, Monster Beverage (MNST.O) shares rose 5 percent to $74 a day after reporting results.
Salesforce.com shares fell 5.8 percent to $62.37, a day after it raised its full-year revenue forecast but its profit forecast was largely below estimates. Other business software makers also fell, including Workday (WDAY.N), down 4.8 percent at $109.92, and Netsuite (N.N), down 3.8 percent at $115.09.
Advancers beat decliners on the NYSE by 1,818 to 1,186 while on the Nasdaq decliners beat advancers by 1,408 to 1,188.
About 7.7 billion shares changed hands on U.S. exchanges, above the 7 billion average this month, according to data from BATS Global Markets.