President Donald Trump on Friday announced at the National Rifle Association's annual meeting that the United States will drop out of an international arms treaty signed in 2013 by then-President Barack Obama but opposed by the NRA and other conservative groups.

Trump told members of the gun lobby that he intends to revoke the status of the United States as a signatory of the Arms Trade Treaty, which was never ratified by the U.S. Senate.

'We're taking our signature back,' Trump said to thousands of cheering attendees, many wearing red hats emblazoned with the Republican president's 'Make America Great Again' slogan.

'Under my administration, we will never surrender American sovereignty to anyone, Trump said, before signing a document on stage asking the Senate to halt the ratification process. 'We will never allow foreign diplomats to trample on your Second Amendment freedom.'

Home crowd: Donald Trump was in upbeat mood as he used an appearance at the NRA's annual forum to say he was pulling the U.S. out of a gun trade treaty long opposed by the lobby group

Conspiracist: The crowd included this man whose shirt voices support for the Q-Anon conspiracy theory as well as for the president

Ovation: Trump's speech to the NRA brought one man to his feet at the convention in Indianapolis, Indiana

MAGA country: Hats at the NRA gathering left little doubt about who they support as they waited for the president to speak

Ovation: The NRA crowd gets to its feet at the gun lobby group's annual convention

Pledge of allegiance: The crowd stood to recite the pledge before the arrival of Donald Trump

Happy to be here: Donald Trump takes to the stage at the NRA's annual leadership forum where he announced a crowd-pleasing measure pulling the U.S.'s signature from an international treaty on the arms trade

The NRA has long opposed the treaty, which regulates the $70 billion business in conventional arms and seeks to keep weapons out of the hands of human rights abusers.

The lobbying group argues it would undermine domestic gun rights, a view the Obama administration rejected.

Trump said the United Nations would soon receive formal notice of the withdrawal.

The NRA spent $30.3 million in support of Trump's 2016 presidential campaign, according to the Center for Responsive Politics, a group that tracks campaign spending.

The 193-nation U.N. General Assembly overwhelmingly approved the treaty in April 2013 and the United States, the world's No. 1 arms exporter, voted in favor of it despite fierce opposition from the NRA.

Trump's action drew an immediate rebuke from international human rights groups.

'The United States will now lock arms with Iran, North Korea and Syria as non-signatories to this historic treaty whose sole purpose is to protect innocent people from deadly weapons,' said Oxfam America President Abby Maxman.

Adotei Akwei, of Amnesty International USA, said in a statement: 'With this announcement the Trump administration will re-open the floodgates for arms sales with weakened human rights criteria.'

So far 101 countries have formally joined onto the treaty. Another 29, including the United States, have signed it, but not yet formally joined.

Ted Bromund, senior research fellow at the conservative Heritage Foundation, said the treaty 'can only have the perverse effects of driving potential importers to buy from China or Russia' and other nations that are not party to the agreement.

Trump was joined on his trip to the NRA's meeting in Indianapolis by White House national security adviser John Bolton, an advocate of withdrawing the United States from international treaties out of concern they might undermine U.S. authority.

With Friday's announcement, Trump continued his drive to roll back Obama-era initiatives.

Nearly two years ago, Trump announced that the United States would withdraw from the Paris Climate Agreement, which aims to reduce global carbon emissions that scientists link to harmful climate change.

Supporters: Trump posed with NRA-ILA executive director Chris Cox, left, and executive vice president Wayne LaPierre (right) before speaking at the NRA convention

Supporters: This Trump backer left no room for doubting what he thinks of the president

Standing for the anthem: The annual convention for the NRA opened with the pledge and The Star Spangled Banner

Meme of support: Chris Cox, the NRA's executive director, had a mocked-up picture of Joe Biden and Jussie Smollett projected behind him as he spoke

In the hall: The NRA's 148th annual meeting is taking place in Indiana, Indianapolis

USA: Among the guns on sale were Henry rifles, which boast of their American status

Not so USA: Also on sale were versions of Russian-designed AK platform rifles

Trophy: A stuffed deer head was among the items on display outside the convention hall

More trophies: Stuffed lions' heads were on show in the outfitters' section of the convention hall

See our wares: Rifles on display at the Heckler & Koch stand at the NRA's annual convention in Indianapolis, Indiana

Bumper sticker stand: Proud NRA members can buy more than just guns, with decals for cars and other souvenirs on sale outside the main convention hall

Republicans argue the U.S. economy would suffer if it met the deal's carbon-reduction goals.

In May, 2018, Trump pulled the United States out of a 2015 international deal that eased sanctions on Iran in exchange for strict limits being placed on Iran's nuclear activities.

The United States has since reimposed some sanctions that had been suspended under the deal.

Friday's speech marked the third consecutive year Trump has spoken to the annual meeting of the NRA. Since his election, he has been a vocal proponent of gun rights, a position that plays well with his political base.

Trump has vowed never to infringe on the right to own guns enshrined in the Second Amendment to the U.S. Constitution, which he said on Friday was 'under assault' by Democrats.

Trump banned 'bump stocks' - rapid-fire gun attachments used in the October 2017 mass shooting that killed 58 people at a country music festival in Las Vegas.

But he sidestepped tough restrictions he considered after the February 2018 shooting at a high school in Parkland, Florida, in which 17 people were killed and embraced an NRA proposal for arming teachers to defend schools.