But things have changed. Johnson has committed several high-profile gaffes in recent weeks that revealed apparent weak spots in his foreign-policy knowledge. Meanwhile, Trump had seemed to be surging back into contention after he fell well behind in the polls in early August.

Weld’s comments in a Globe interview mark a major shift in his mission since he pledged at the Libertarian convention in May that he would remain a Libertarian for life and would do all he could to help elect his running mate, Gary Johnson, the former Republican governor of New Mexico.

The Libertarian vice presidential candidate, William F. Weld, said Tuesday that he plans to focus exclusively on blasting Donald Trump over the next five weeks, a strategic pivot aimed at denying Trump the White House and giving himself a key role in helping to rebuild the GOP.


While Weld insisted he still supports Johnson, he said he is now interested primarily in blocking Trump from winning the presidency and then potentially working with longtime Republican leaders such as Mitt Romney and Haley Barbour to create a new path for the party after the election.

“Maybe somebody is going to come up with a new playbook, and I don’t know who it’s going to be, but it would be fun to participate,” Weld said in a telephone interview from Atlanta, where he was holding a fund-raiser and rally and planned to watch and tweet about Tuesday night’s vice-presidential debate featuring his major-party rivals, Democrat Tim Kaine and Republican Mike Pence.

Weld, a former Republican governor of Massachusetts, said he is focusing on Trump because, while he disagrees with Hillary Clinton on fiscal and military issues, Trump’s agenda is so objectionable it’s “in a class by itself.”

“I think Mr. Trump’s proposals in the foreign policy area, including nuclear proliferation, tariffs, and free trade, would be so hurtful, domestically and in the world, that he has my full attention,” Weld said.


He insisted he was not abandoning Johnson, although he signaled that bolting from the Libertarian Party might be a possibility in the future.

“I’m certainly not going to drop them this year,” Weld said.

Weld’s comments seemed sure to reignite suspicions among Libertarians who have questioned his loyalty to the party and have accused him of using the ticket for his own political aims. But Weld’s decision to chart his own course appears to reflect the feeling among his aides, who have privately expressed dismay at Johnson’s flubs on national television, such as when Johnson could not come up with the name of a favorite foreign leader and when he said “What is Aleppo?” when asked about the besieged Syrian city.

Those missteps — in sharp contrast to Weld’s smoother command of foreign affairs — have created some tensions on the ticket. Adding to the conflict are the accolades Weld has recieved from national political commentators who have dubbed him the more substantial and serious candidate, while ridiculing Johnson as a lightweight.

“Unfortunately, if the ticket was flipped, they might have more success,” said Bob Durand, a Weld ally and former Democratic state senator who donated $1,000 to the Libertarian ticket.

At one point, Weld strategists researched Libertarian Party rules to see if it were possible for him to take over the top of the ticket. The rules state the vice presidential nominee automatically assumes the presidential spot if there is a vacancy. But Johnson, peeved at the suggestion, flatly rejected the idea.


Weld insisted he and Johnson remain “happy warriors” and said Johnson is fully supportive of his anti-Trump campaign.

“I have had in mind all along trying to get the Donald into third place, and with some tugging and hauling, we might get there,” Weld said.

Weld has been much more critical of Trump than of Clinton, whom he has known since the 1970s, when they were young lawyers working for the House committee that investigated President Richard Nixon.

Just last week, for example, Weld irked Johnson supporters when he said on MSNBC that he’s “not sure anybody is more qualified than Hillary Clinton to be president of the United States.”

Weld, meanwhile, has denounced Trump as a “huckster” with a “screw loose” and has said his plan to deport 11 million illegal immigrants “would remind me of Anne Frank hiding in the attic.”

Weld’s new plan calls for him to focus his fire on Trump in a handful of red states — as well as in at least one swing state, New Hampshire — where the Libertarians are running strong. Nationally, the ticket is drawing about 7 percent support.

Polls show that Johnson and Weld — who were initially thought to appeal mostly to anti-Trump Republicans — may be doing more damage to Clinton by siphoning away young voters.

“That’s obviously a concern,” said Mark Robinson, Weld’s friend, former chief of staff, and colleague at the Boston law firm Mintz Levin. “He certainly doesn’t want to be in that position where Trump could win and people would be blaming him.”


Robinson said it would make sense for Weld to step up his criticism of Trump, particularly after Weld failed to clear the 15 percent polling margin needed to qualify for the debates.

“He’s got to push his message out with more urgency and even more bellicosity than he has before,” Robinson said. “There’s no shortage of material to attack Donald Trump.”

Michael Levenson can be reached at mlevenson@globe.com. Follow him on Twitter @mlevenson. Frank Phillips can be reached at frank.phillips@globe.com.