Iain Stables' farm machinery theft spree ended in February 2016 when a John Deere dealer flying over his Saskatchewan property recognized the stolen equipment in his yard.

Prosecutor Michael Segu said that flight led to a search warrant and Stables' eventual arrest.

He pleaded guilty on Friday to 18 counts in connection with his five years of theft.

Court heard how Stables stole the machinery to help run his cattle farm west of Saskatoon. The pieces included John Deere farm tractors, hay balers, two Dodge trucks, one cattle hauler and one haybuster.

Stolen farm equipment recovered by RCMP. (RCMP)

A Saskatoon provincial court judge accepted the joint submission by Segu and defence lawyer Brad Mitchell and sentenced Stables to a two-years-less-a-day conditional term to be served in the community, followed by another three years of probation.

​Stables also faces a significant restitution order.

As part of the joint submission, Stables agreed to pay $111,000 to four victims. The single largest piece is $50,000 to a Saskatoon John Deere dealer.

Segu said the dealer has launched a civil suit against Stables at Court of Queen's Bench.

As part of his sentence, Stables must take a mental health assessment and any programming that may be ordered out of that.