A trader works on the floor of the New York Stock Exchange

US stocks Friday finished higher as investors weighed the implications of escalating sectarian violence in Iraq that has lifted oil prices to nine-month highs.
At the closing bell, the Dow Jones Industrial Average advanced 38.02 points (0.23 percent) to 16,772.21.
The broad-based S&P 500 gained 5.77 (0.30 percent) at 1,935.88, while the tech-rich Nasdaq Composite Index rose 13.02 (0.30 percent) to 4,310.65.
Iraq remained at the center of attention as Shiite Grand Ayatollah Ali al-Sistani urged the people to defend the country against jihadist insurgents while President Barack Obama said he was examining options short of sending in US troops.
Insurgents seized the city of Mosul earlier this week and have launched attacks approaching Baghdad.
US benchmark West Texas Intermediate for July rose 38 cents to close at $106.91 a barrel, a fresh nine-month high. However, the increase in US oil prices was much smaller than Thursday's. 
Michael James, managing director of equity trading at Wedbush Securities, said the market remains in "a bullish uptrend" and that Iraq will not significantly affect that sentiment "until there's some material concerns that present themselves."
But Mace Blicksilver, director of Marblehead Asset Management, characterized the Iraq situation as "very unsettling" for investors.
"Iraq is a place we forgot about and suddenly we see this unraveling and it has very dramatic implications," he said.