Former Massachusetts Gov. Bill Weld won the Libertarian nomination for vice president Sunday, despite not receiving a warm welcome from delegates at the party’s convention.

Weld secured the nomination on the second ballot, with 50.6 percent of the vote, beating out his nearest rival, Larry Sharpe, by 32 votes.

ADVERTISEMENT

On the first ballot, Weld got 49.022 percent of the vote, just shy of the 50 percent needed for the nomination.

Weld, whom many party members don't consider a “true” Libertarian, joined the party less than two weeks ago and had previously endorsed Ohio Gov. John Kasich in the Republican primary.

His running mate, Gary Johnson, a former governor of New Mexico, received the party’s nomination for president earlier Sunday — also on the second ballot.

Johnson pleaded with delegates to vote for Weld after securing his own nomination.

“Please, give me Bill Weld,” Johnson said. “Give me Bill Weld, and I will give you the best effort I possibly can going forward. Please. Please.”

In an extremely short speech accepting the nomination, Weld pledged he and Johnson would “do our level best to make sure we represent all of the very best ideas and ideals of the Libertarian Party of the United States.”

He promised the ticket would offer “a third way” for the November election.

Weld drew attention when he compared the immigration policies of presumptive Republican nominee Donald Trump Donald John TrumpUS reimposes UN sanctions on Iran amid increasing tensions Jeff Flake: Republicans 'should hold the same position' on SCOTUS vacancy as 2016 Trump supporters chant 'Fill that seat' at North Carolina rally MORE to Kristallnacht, the night in 1938 when Nazis set fire to synagogues and vandalized Jewish homes and businesses, killing nearly 100 Jewish people.

“I can hear the glass crunching on Kristallnacht in the ghettos of Warsaw and Vienna when I hear that, honest,” Weld told The New York Times.

The Libertarian Party has drawn more attention this year as more and more voters seek alternatives to Hillary Clinton and Donald Trump, both of whom have unprecedentedly low favorability numbers.

In three national polls, Johnson was in the double digits in a hypothetical match-up against Trump and Clinton, the likely nominees for the Republican and Democratic parties, respectively.