TORONTO — The Toronto stock market closed lower Friday as nervous investors backed off ahead of the weekend amid rising tensions in Ukraine.The S&P/TSX composite index declined 20.68 points to 14,533.57. The Canadian dollar was down 0.07 of a cent at 90.61 cents US.U.S. indexes also retreated as the Dow Jones industrials tumbled 140.19 points to 16,361.46, the Nasdaq dropped 72.78 points to 4,075.56, also pressured by a 9.8% drop in Amazon’s share price after the retailer warned of a likely operating loss in the second quarter. The S&P 500 index slid 15.21 points to 1,863.4.Russia’s foreign minister has accused the West of plotting to control Ukraine and also announced military exercises near Ukraine’s border. And late Friday afternoon, Ukraine’s deputy foreign minister said he feared an imminent Russian invasion.Danylo Lubkivskye spoke as an official in Ukraine confirmed that pro-Russian forces had detained a team of military observers with the Organization for Security and Co-operation in Europe.“We can’t dismiss what is going on there. It is a concern, it could escalate,” said Gareth Watson, vice-president investment management and research, Richardson GMP Ltd.At the same time, the economic cost to Russia for its stance toward Ukraine increased as Standard & Poor’s cut Russia’s credit rating from BBB to BBB-minus — one step above non-investment grade.S&P said it took the step because the tense situation “could see additional significant outflows of capital from the Russian economy.”The latest escalation in tensions came at the end of what had been a generally positive week on markets thanks to better than expected corporate earnings in Canada and the United States.“What’s more important is that we haven’t seen any massive downgrades to guidance,” Watson said. “There’s been a few tweaks to guidance going forward but not massive.”On Friday, automaker Ford said first-quarter net income fell 39% to US$989 million or 24 cents per share, seven cents below estimates. Revenue rose slightly to $35.9 billion, beating analysts’ expectations for $34.2 billion and its shares lost 3.3% to $15.78.In Canada, business software provider Open Text Corp. (TSX:OTC) posted quarterly net earnings of $45.8 million or 33 cents per share, up from $25.8 million or 22 cents in the comparable year-earlier period as revenue rose to $442.8 million from $337.7 million. The company also upped its quarterly dividend by 15% to 17.25 cents a share. Its shares climbed $3.30 or 6.49% to $54.11.In other corporate developments, Canadian Oil Sands Ltd. (TSX:COS) lowered its 2014 production guidance for the Syncrude Canada oilsands mine north of Fort McMurray, Alta., to between 95 million and 105 million barrels, compared with an previous estimate of 95 million to 110 million barrels as a result of a breakdown at one of its cokers, which help convert heavy oilsands bitumen into a lighter type of crude. Its shares fell 88 cents or 3.65% to C$23.25.The energy sector dropped 0.54% as June crude in New York gave back $1.34 to US$100.60 a barrel.May copper was unchanged at US$3.12 a pound and the base metals group was up 0.4%.The gold sector was the leading advancer, up about 2.4% as geopolitical worries drove June bullion up $10.20 to US$1,300.80 an ounce.Indexes closed little changed this week with the TSX up 33 points and the Dow industrials down 47 points.