With an eye toward the 2020 elections, President Donald Trump and Vice President Mike Pence issued dire warnings about the nation’s future before about 15,000 gun enthusiasts at the National Rifle Association’s national convention in Indianapolis.

The nation’s top two elected officials spoke to the Lucas Oil Stadium crowd about gun control, socialism, international treaties and what Trump called a “coup” at the “highest levels” of government.

In many ways, it was a sneak peek at how they plan to rally their base ahead of the 2020 presidential election. Here are 5 takeaways.

NRA supporters heard what they wanted on guns

No surprise here: Trump and Pence repeatedly pledged to protect gun rights and criticize Democrats, sometimes linking the issue to another favorite Trump topic: immigration.

“In recent days, leading Democrats have proposed banning new guns and confiscating existing guns from law-abiding citizens,” Trump said. “What they don’t tell you is the bad guys aren’t going to give up their guns.”

He then blasted Democrats for resisting his efforts to construct a wall on the nation’s southern border.

“Democrats want to disarm law-abiding Americans while allowing criminal aliens to operate with impunity, but that will never happen while I’m your president,” Trump said.

In their own words:Video of Trump supporters sharing thoughts on guns

Protests: 'Baby Trump' balloons, a Hamburglar and fears of 'creeping fascism'

Earlier, Pence invoked Charlton Heston's famous "from my cold, dead hands" slogan in showing his support for the NRA's mission.

"Well, I'll make you a promise: Under this president and this vice president, no one is taking your guns," he said. "Firearms in the hands of law-abiding citizens don't threaten our families, they protect our families."

Trump later invited three people onstage to tell stories about how they used their guns to shoot and stop would-be killers. He took credit for a nationwide drop in violent crime. He did not address criminal homicides in Indianapolis, which last year set a fourth straight record high.

Trump scrapped an international arms treaty on the spot

Trump used his speech to announce he would pull out of the Arms Trade Treaty, a global 2014 pact designed to regulate the sale of myriad conventional weapons.

"We will never surrender American sovereignty to anyone," Trump said, adding later, "We are taking our signature back."

He then he signed a document from the podium, asking the U.S. Senate to immediately stop the ratification process, and send the agreement back to him so he could rescind U.S. participation.

News on stage:Trump reverses U.S. course on Arms Trade Treaty

The former reality TV star then threw what he called the “famous pen” he had just used into the audience.

The treaty was aimed at creating common standards for the global trade of conventional weapons and reducing the same of illicit arms. The treaty does not include any restrictions on the type or quantity of arms that can be bought or sold in individual countries or in any way impact domestic gun control laws, according to the Arms Control Association, a nonpartisan group focused on arms control policies.

Critics blasted Trump’s move as deeply harmful.

"President Trump is sending a clear message to civilians caught in the crossfire: we don’t care,” said Abby Maxman, the president of Oxfam America, an international anti-poverty group. She said an estimated 500,000 people are killed annually as a result of the unregulated and under-regulated arms trade.

Trump again alleged an attempted ‘coup’

The president also continued his efforts to stir suspicions about the report from special counsel Robert Mueller on Russian interference in the 2016 election -- just a week after it was made public.

"You see it now with all of the resignations of bad apples; they're bad apples,” he said, referring to unspecified actors. “They tried for a coup. Didn't work out so well.”

He added: "And I didn’t need a gun for that one, did I?" The crowd laughed and applauded.

It was not clear to which resignations the president was referring. It’s all happening "at the highest levels in Washington, D.C.,” he said.

"You've been looking at things that you wouldn't have believed possible in our country," he continued. "Corruption at the highest level. A disgrace. Spying, surveillance. Trying for an overthrow. And we caught 'em. We caught 'em."

Speaking in Indy: Trump says FBI investigation was attempted 'coup'

While Trump did not specify in his speech the exact events he was referencing, in an interview Thursday night with Fox News host Sean Hannity, Trump called the FBI probe into his 2016 campaign and subsequent investigations into Russian election meddling “an attempted overthrow" of his administration.

The Mueller report did not conclude that Trump's actions were illegal. Nor did they clear him of wrongdoing, stating "if we had confidence after a thorough investigation of the facts that the president clearly did not commit obstruction of justice, we would so state.”

The two-year inquiry led to the indictment of more than 30 individuals, including Trump’s first national security adviser, his campaign manager and one of his attorneys.

A 2020 referendum on socialism?

If their speeches Friday are any indication, Trump and Pence are looking to make the 2020 election a referendum on socialism.

Pence blasted Democratic proposals for a Green New Deal and Medicaid for all, and he told the audience there is a battle between "freedom and socialism.”

"The moment America becomes a socialist country is the moment America ceases to be America," he said.

'Stakes have never been higher':Pence asks Indy NRA crowd for help in 2020

Read it all: Mike Pence's NRA speech

Trump used a similar line of attack in teasing a new slogan for his 2020 campaign.

“We’re thinking about a slogan: Keep America Great,” he said. “Because you have socialists and far-left Democrats who want to destroy everything we’ve done.”

But the United States already has a number of programs that could be considered forms of socialism, including Medicare and Social Security.

And while some of the programs Pence referenced have been considered radical in the past, they are finding much more support amid a generational divide over socialism.

Holcomb is tall, and the Pences' dog is cute

There was less Indiana flair at Friday's event than at some previous Trump rallies — past Hoosier State appearances have included Bobby Knight, for instance — but the president did give a shoutout to the state’s top elected officials.

“Where’s Eric?” he asked when he couldn’t immediately spot Gov. Eric Holcomb. “You can’t miss Eric; he’s so big!”

The governor is six-foot-five.

Video: Air Force Two lands in Indianapolis

Pence also spent some time mingling with his longtime Hoosier supporters after arriving at Indianapolis International Airport, where he and his wife descended from Air Force Two with the family dog, Harley.

At one point, Pence picked up the dog so that some of the children in the crowd could pet him over the barricade at the edge of the tarmac. He explained that he wanted a motorcycle for Father’s Day, but ended up with a puppy instead — hence the dog’s name.

IndyStar reporters Tim Evans, Kellie Hwang and Holly V. Hays, and USA Today reporter Deirdre Shesgreen, contributed to this story.

Contact IndyStar reporter Tony Cook at 317-444-6081 or tony.cook@indystar.com. Follow him on Facebook or Twitter: @IndyStarTony.

Call IndyStar reporter Amy Bartner at 317-444-6752. Follow her on Facebook, Twitter and Instagram.