TEHRAN (Reuters) - U.S. citizens Shane Bauer and Josh Fattal, detained in Iran for more than two years, have been found guilty of spying and given sentences of eight years each, Iranian state TV reported Saturday.

"In connection with illegal entry into Iranian territory each was given three years in jail and in connection with the charge of cooperating with American intelligence service, each was given five years in jail," the IRINN website reported, quoting an informed judiciary source.

They say they were hiking in the mountains of northern Iraq and, if they crossed the unmarked border into Iran, it was by mistake.

(Reporting by Hossein Jaseb; Writing by Robin Pomeroy)