“This community has changed immensely from where we were back in the ’60s,” said Mr. Bennett, a businessman whose holdings include a taxi service. “You could come out of high school here and go to any one of the factories in the city and have a very viable career, raise a family and maintain a good quality of life.”

The mayor said that the shift of jobs away from large factories to federal and provincial government offices, tourism, hospitals, the local university and college and smaller manufacturers had begun before the introduction of free trade in 1989. The city’s unemployment rate, he added, fluctuates, but is often near the national average. Last month it was 4.9 percent. But he, too, is dissatisfied with the current pact.

“Nafta is a very interesting agreement,” he said in his somewhat cramped City Hall office. “Mr. Trump is certainly not far-off on the need to make some changes to that agreement, quite frankly. But what those are is better left to the experts.”

At the union hall, Mr. Corp’s mood was more mourning than anger. G.E.’s last 350 unionized employees make electric motors and generators so large that electrical lines sometimes must be lifted if the products leave town on extra-heavy-duty trucks. Peterborough-made motors turn cruise ship propellers, pump oil, power factories and mines and generate electricity around the world. (G.E. has not disclosed which of its remaining factories will pick up Peterborough’s work.)

“The guy that runs a lathe or a guy that runs a C.N.C. machine or a guy that winds large motors — they’re skilled guys,” Mr. Corp said. “But where are they going to get a job as far as government jobs in town? I don’t mean that they don’t have the smarts to do it. But they’re in their mid-40s, mid-50s and they’ve been tradesmen their whole lives.”