EXCLUSIVE

Jim Lahey will return to Sunnyvale Trailer Park in the upcoming season of "Trailer Park Boys" -- but the character won't be back after that ... TMZ has learned.

Sources involved in the production tell us John Dunsworth's character will not be recast after season 12. We're told Dunsworth completed filming for the season before his death this week.

We're told producers believe Dunsworth is irreplaceable in that role, and it would damage the franchise to put another actor in the role.

Dunsworth played the drunken cop-turned-security guard on 'Boys' since its debut in 2001.