Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

ORLANDO, Florida — The Libertarian Party nominated former New Mexico Gov. Gary Johnson and former Massachusetts Gov. William Weld as its presidential ticket Sunday, as the party attempts to elevate itself into the mainstream during an election that's given the small party unprecedented opportunity.

The pair — both two-term governors — have more executive experience than any other candidate in the race, and they will offer an alternative to two historically unpopular candidates, presumptive Republican nominee Donald Trump and Democratic front-runner Hillary Clinton.

Libertarian presidential candidate Gary Johnson at the Libertarian Convention in Orlando, Florida, on Friday. AP

"This is the best message team going forward," Johnson, the Libertarians' presidential nominee, told reporters after Weld won the vice presidential nomination.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

And it all came to be in a contested convention. After endless speculation that the Republican Party's divided primary might end in a contested convention in Cleveland and continued theories that the Democrats' primary could end in Philadelphia with a floor battle between party insiders, 2016 finally had a contested convention — in Orlando.

Johnson won on the second ballot after falling short of a majority by just a few votes — getting 49.5 percent — on the first.

Read This Story on MSNBC.com

The tense hour between ballots left candidates scheming and delegates making floor deals and chanting for and against candidates. It was the kind of drama political reporters had previously only dreamed about.

"We could go all night — we have gone very late," party Chairman Nicholas Sarwark said, speaking of multiple-ballot voting, which happens routinely with the Libertarians and are largely ignored by the media. But this year, it's different: An unpopular and controversial mainstream contest has given Libertarians an opening.

While Johnson locked down enough votes on the second ballot, the drama was far from finished Sunday. Libertarians also allow their party to choose the vice presidential nominee, and Johnson's chosen running mate — Weld — is not a party favorite, as many question whether he's really a Libertarian. It didn't help that he endorsed Ohio Gov. John Kasich for the Republican presidential nomination earlier in the primary cycle.

In speeches ahead of the ballot, the runner-up presidential candidate, publisher Austin Petersen, spoke out against Weld; another vice presidential candidate, lawyer Alicia Dearn, spoke in support of party unity, asking Weld to join her on stage to pledge not to "betray the party."

Weld fells a couple of dozen votes short on the first ballot, but he won on the second — by just a few votes — and the crowd erupted in boos and cheers.

After eight straight hours of voting, the Libertarian Party had its nominees and America had finally seen a contested convention.