William F. Weld, the twice-elected former Republican governor of Massachusetts, who was last seen campaigning in the 2006 Republican primary for governor of New York, now hopes to be on a national ticket as the vice-presidential nominee of the Libertarian Party.

And he is already on the attack.

In his first interview since accepting an invitation to be the running mate of former Gov. Gary Johnson of New Mexico, Mr. Weld assailed Donald J. Trump over his call to round up and deport the 11 million immigrants in the country illegally.

“I can hear the glass crunching on Kristallnacht in the ghettos of Warsaw and Vienna when I hear that, honest,” Mr. Weld said Thursday.

Mr. Weld, 70, was not uniformly critical of the presumptive Republican nominee. “I don’t consider myself part of the Never Trump movement,” he said, expressing admiration for Mr. Trump’s success in the primary contest.