Rattled by the Greek crisis, the TSX index slipped into the red last month but turned positive again on Thursday.

The market's focus was on a Greek referendum this Sunday on an international bailout deal that the country's prime minister has urged Greeks to reject. Greece defaulted on its debt to the International Monetary Fund earlier this week.

Concern about referendum's outcome left investors favoring sectors that are typically thought of as being save havens. The healthcare sector <.GSPTTHC> rose 1.3 percent, with Valeant Pharmaceuticals (>> Valeant Pharmaceuticals Intl Inc) among the biggest positive influences on the index, rising 3.5 percent to C$286.70.

“We’re seeing a rise in market volatility, largely related to the situation in Greece,” said Elvis Picardo, strategist and vice president of research at Global Securities in Vancouver.

“The referendum on Sunday might set the tone for the markets for a while,” he added.

The Toronto Stock Exchange's S&P/TSX composite index <.GSPTSE> unofficially closed up 84.66 points, or 0.58 percent, at 14,637.99. Eight of the 10 main sectors on the index were higher.

Energy shares <.GSPTTEN> shed 0.2 percent and the mining-heavy materials sector <.GSPTTMT> gave up 0.1 percent.

Potash Corp (>> Potash Corp./Saskatchewan Inc.) shares rose 0.5 percent to C$38.88 after German potash miner K+S (>> K&S AG) rejected the Canadian company's takeover offer.

Shares of Brookfield Asset Management (>> Brookfield Asset Management Inc) rose 1.7 percent to C$44.37 after Brookfield approached Australian freight company Asciano (>> Asciano Ltd) with a $6.8 billion (C$8.56 billion) takeover bid.

(Reporting by Leah Schnurr in Ottawa and John Tilak in Toronto; Editing by Peter Galloway)