Libertarian presidential nominee Gary Johnson blundered through a question to name his "favorite foreign leader" on MSNBC Sept. 28, marking what he dubbed "an Aleppo moment." Here's a look back at his other on-camera missteps. (Jenny Starrs/The Washington Post)

Gary Johnson, the Libertarian nominee for president, had been raring for Wednesday night's "town hall" on MSNBC. He had been cut from the first televised debate after missing the polling threshold, and he had not been invited when the network hosted a "commander-in-chief forum" with Hillary Clinton and Donald Trump.

"This was their consolation prize," Johnson told The Washington Post this week when asked about the MSNBC special. "It was put to us that, look, you weren’t in this initial program. Here’s what we’d like to offer in lieu of being with the two major-party candidates. And I said, 'An hour of prime time Chris Matthews? I'll take it.' "

But the hour didn't go as planned. Johnson, who had been pilloried for blanking on the relevance of the Syrian city of Aleppo in another MSNBC interview, whiffed his way through an even easier foreign policy question.

"Who's your favorite foreign leader?" Matthews asked.

"Who's my favorite?" Johnson replied.

"Anywhere in the continents," Matthews said. "Any country. Name one foreign leader that you look up to."

William Weld, Johnson's running mate, chimed in with an assist: "I'm with Shimon Peres."

"I'm talking about living, okay?" Matthews said. "You gotta do this. Any continent. Canada, Mexico?"

"I guess I'm having an Aleppo moment," Johnson said.

"In the whole world!" Matthews said. "Anybody in the world."

"I know, I know," Johnson said.

"Pick any leader," Matthews said.

"The former president of Mexico," Johnson said.

"Which one?" Matthews said.

"I'm having a brain freeze," Johnson said.

Weld, who had left the governor's office in Massachusetts in an unsuccessful attempt to become ambassador to Mexico, began naming the country's former presidents. "Fox? Zedillo? Calderon?"

"Fox," Johnson said with a combination of jubilation and relief. "He was terrific."

Johnson's inability to remember the full name of Vicente Fox was a genuine surprise. Johnson governed New Mexico, which shares a small border with Mexico, from 1995 to 2003. Fox, a former Coca-Cola executive, won Mexico's 2000 presidential election with an unusual amount of fanfare, as his center-right National Action Party (PAN) broke generations of one-party rule by the center-left Institutional Revolutionary Party (PRI).

And in recent months, Fox had become a vigorous opponent of Donald Trump. He gave several interviews promising that Mexico would not "pay for that wall" if Trump won the presidency. He was filmed bashing a Trump-shaped piñata. He tweeted mockery at Trump when he managed to wind up on a Trump campaign fundraising email list.

Johnson had appeared to notice. Over the summer, as he rose in the polls, Johnson added Texas-based immigration reform advocate Juan Hernandez as an adviser on Latino issues. This past weekend, at the annual Texas Tribune Festival in Austin, Hernandez organized interviews between Johnson and several Spanish-language TV stations. The Washington Post was in the room as Hernandez talked Johnson through a Mexican television spot, where he offered to meet with Mexico's President Enrico Peña Nieto to discuss immigration and trade. "As Vicente Fox says, 'Hoy, hoy, hoy!' " Johnson said.

And on Monday, minutes before the debate began, Johnson told a room full of journalists that he would have lit up the stage had he been permitted to share it. Arit John, a reporter for Bloomberg Politics, asked if the "Aleppo moment" had suggested he would fluster when the debate turned to policy. Pacing behind a desk, his yellow tie partly undone, Johnson said he was furious at American foreign policy and had had enough of gotcha questions.

"Hillary Clinton crosses the I's and crosses the T's on all of the names and everything associated with this," Johnson said. "But as a result of that, we have the foreign policy we have right now, which I have to tell you, I think is horrible. Horrible! And that's how I would answer it tonight. I would be mad. I would be angry. I would angry that they would be calling out names of geographic locations, names of foreign leaders, when the underlying policy has thousands of people dying."

Appearing on MSNBC's "Morning Joe," Libertarian Party presidential candidate Gary Johnson was asked what he would do about Aleppo if he were elected president. Johnson replied, "What is Aleppo?" Here's what he needs to know. (Jason Aldag/The Washington Post)