Democratic vice-presidential candidate Sen. Tim Kaine (D-Va.) speaks during a campaign rally in Wilmington, N.C., on Sept. 6. (Chuck Burton/AP)

WILMINGTON, N.C. — Hillary Clinton's vice-presidential running mate Sen. Tim Kaine sharply criticized Donald Trump for taking myriad contradictory positions on foreign policy issues and said that he lacked a basic knowledge of the issues at hand in a speech here Tuesday afternoon.

"The prospect of the emotionally volatile, fact-challenged, self-obsessed and inexperienced Donald Trump as commander in chief scares me to death," Kaine said at the Hannah S. Block Historic USO Building in downtown Wilmington to an invitation-only crowd that included some military veterans.

Kaine's comments come a day before Clinton and Trump are expected to appear Wednesday night at a televised commander in chief forum.

Ahead of their appearances, Kaine sought to paint Trump as both deceptive about his positions on key issues and inexperienced on the world stage.

Kaine's remarks were part denunciation, part fact-checking. And they served as a preview of new lines of response and attack that Clinton might deliver at the forum.

Kaine accused Trump of lying to the American people about his record of support for the Iraq War. Specifically on Trump's claim that he opposed the war, Kaine ticked off Trump's various positions at length.

"In Trump’s first campaign speech, he claimed he’d had the foresight to say, ‘Don’t hit Iraq,’ because you’re going to totally destabilize the Middle East," Kaine said. "It’s one of the main rationales for his candidacy. And it’s completely made up."

"He says whatever he feels like at any given time because that’s what you do when you’re a TV star," Kaine added. "But you can’t do that when you’re president of the United States."

Kaine questioned Trump's contradictory judgment in criticizing Clinton and President Obama's strategy in Libya while also seeking to do business with then-Libyan dictator Moammar Gaddafi.

According to Kaine, Trump was "playing an armchair general" on television, calling on America's military to act to oust Gaddafi. But at around the same time, he made a deal to allow Gaddafi to stay in a tent at Trump's Westchester County, N.Y., estate. The deal ultimately fell through.

"That’s right: When Gaddafi was looking for a place to stay in America, and no one else would take him in, he found the one guy who was willing to host him: Donald J. Trump," Kaine said. "You were saying something about judgment, Donald?"

And Kaine said that in several interviews, Trump appeared to be unfamiliar with key actors in the Middle East and that Trump seemed unfamiliar with the leader of the Islamic State, Abu Bakr al-Baghdadi.

Kaine's speech was also an opportunity for Kaine to highlight his own foreign policy credentials. He made note of his membership on the Senate Armed Services and Foreign Relations committees, his missionary work in Honduras, and his son's service in the Marine Corps.

By comparison, Kaine said Trump lacks "credible plans" for the national security challenges that the country faces.

"Apparently, he doesn’t have much use for real-world experience either," Kaine said. "Most of his knowledge comes from reality TV. He says he gets his insight from — quote — ‘the shows’ on cable news."

Both Clinton and Kaine focused on national security issues Tuesday as they sought to define Trump as an unpredictable and inexperienced candidate.

On Tuesday morning, the campaign released a new television ad called “Sacrifice,” which highlight’s Trump’s comments about military veterans and the sacrifice of military families.

In keeping with the pattern of many Clinton ads in this cycle, this one features Trump’s own words spliced with news coverage of his statements. For most of the ad, Trump is not pictured, but wounded and elderly veterans are shown watching and listening, stone-faced. Among them: former Georgia senator and U.S. Army veteran Max Cleland (D).

“I know more about ISIS than the generals do,” Trump said, referring to the Islamic State.

Of Sen. John McCain (R-Ariz.), Trump says: “He’s not a war hero. He’s a war hero because he was captured. I like people that weren’t captured, okay?”