* TSX ends down 2.2% at 22,227.63

* Tech and energy shares lead declines

* Magna falls 6% as results miss estimates

* For the week, the TSX loses 2.6%

Aug 2 (Reuters) - Canada's main stock index posted its biggest decline in six months on Friday, adding to sharp losses the day before, as resource and technology shares paced a broad-based selloff amid increased worries the United States was headed for recession.

The Toronto Stock Exchange's S&P/TSX composite index ended down 495.58 points, or 2.2%, at 22,227.63, posting its biggest decline since Feb. 13.

The index has pulled back 3.8% since notching on Wednesday a record closing high at 23,110.81. For the week, the index was down 2.6%, after five straight weekly gains.

U.S. stocks also tumbled and investors raised bets the Federal Reserve would cut interest rates aggressively after data showed a significant slowdown in U.S. job growth in July.

The data "is obviously signaling a slowdown in the U.S. economy and unfortunately, perhaps, a recession. At least that's how the markets are taking it," said Allan Small, senior investment advisor of the Allan Small Financial Group with iA Private Wealth.

The Toronto market's technology sector tumbled 4.5% as investors worried about the valuations of some high growth companies. A number of analysts cut their target price on Lightspeed Commerce Inc, with its shares ending 9.4% lower.

Energy was down 4.3% as the U.S. data clouded the demand outlook for oil. U.S. crude futures settled 3.7% lower at $73.52 a barrel.

The materials group, which includes metal miners and fertilizer companies, and heavily weighted financials both lost 2.4%.

Auto parts supplier Magna International Inc missed estimates for second-quarter results. Its shares fell 6%.

Of the 10 main sectors, only utilities ended higher, rising 0.1%. The sector is dominated by high-dividend paying stocks that could particularly benefit from rate cuts. (Reporting by Fergal Smith in Toronto and Purvi Agarwal in Bengaluru; Editing by Vijay Kishore and Will Dunham)