An Alberta squatter who shacked up in his landlord’s driveway after his ex moved out has been ordered off the premises, following a court decision on Tuesday.

Bob Cox, 54, has been ordered not to return to the property in Cardston, Alta., where he has been living without permission since early October. Landlords Ivan and Marsha Negrych had already attempted to serve him an eviction notice, but were forced to take the issue to court when Cox refused to leave.

Cox said last week that he couldn’t leave because he didn’t have a vehicle to move his shack, which is built on a car trailer. But Cox managed to find someone to move the shack on Monday, a day before his court date with Negrych.

The Negrychs say they’re just happy the battle with Cox is over.

Marsha Negrych said they tried to be “nice and civilized” to Cox, but his behaviour forced them to take the issue to court.

“I felt that the law was definitely on our side,” she told CTV Lethbridge.

“It’s been extremely stressful to have to deal with this on a daily basis for months on end,” Ivan Negrych added.

Cox declined to speak to CTV Lethbridge on Tuesday, but last week said he was looking forward to appearing in court so he could voice “a few other issues that I have concerns about.”

The judge terminated Cox’s tenancy rights effective Nov. 6, and ruled that any property left behind would be considered abandoned. A second hearing will be required to rule on damages and rental payments in arears.

Cox previously said he built the shack on the driveway to be close to his former common-law wife. She was the official tenant at the home until Sept. 30, when she moved out.

Ivan Negrych said the ordeal has taught him a lesson for the future.

“We’ll be more diligent in whom we rent to and that we follow paperwork and the landlord tenancy act to the letter,” he said.

“The system does work,” he added. “It’s very time-consuming, but it does work.”

With files from CTV Lethbridge