Word spread quickly through cellphone messages and shouts between co-workers that Ford Motor Co. had canceled its new $1.6 billion car plant at its sprawling 700-acre high desert site in north-central Mexico.

“When I saw it on the phone, [I thought], ‘Well, no, it can’t be,’” said Higinio Salazar, a security guard who spent the past five months logging traffic into and out of the site and hoped to have steady work for months to come. “It was on orders of Mr. Trump,” he said bitterly.