Libertarian presidential nominee Gary Johnson would run for president again in four years if he's not elected in November, the candidate announced during a town hall meeting Tuesday night.

"As long as I'm relevant, I will continue this through 2016," Johnson said during the meeting, which was simulcast live online.

A former two-term governor of New Mexico, Johnson initially sought the Republican nomination for president in 2011, but he switched to the Libertarian Party in May after struggling to gain traction in state and national polls. Through the Libertarian Party, Johnson's name will be included on ballots in 47 states on Election Day, and a CNN/ORC poll in early September suggested that he could take as much as 3 percent of the vote.

Johnson has been excluded from the upcoming debates and last month filed an antitrust lawsuit against the Commission on Presidential Debates to gain access. The effort failed, but Johnson plans to answer questions online during Wednesday night's debate between President Barack Obama and Republican nominee Mitt Romney, much like he did when he wasn't invited to most of the Republican primary debates last year.

During the town hall Tuesday, Johnson joked about people who say that a vote for anyone other than Obama or Romney was a "waste."

"Waste your vote!" he told the audience. "Vote for me."

After the meeting, the crowd hoisted Johnson over their heads and he "crowd surfed" around the room.