INDIANAPOLIS — President Trump on Friday announced that he was pulling U.S. support from the United Nations Arms Trade Treaty, saying America wasn’t going to cede sovereignty to anyone.

“I am officially announcing today that the United States will be revoking the effect of America’s signature from this misguided treatment,” Mr. Trump told gun-rights activists gathered for the NRA’s annual meetings. “We’re taking our signature back.”

“My administration will never ratify the U.N. Arms Trade Treaty,” he said. “I hope you’re happy.”

The treaty is intended in part to prohibit arms transfers from going to countries with questionable human rights records, but gun-rights advocates have been wary that it could ultimately lead to a gun registry in the U.S.

President Barack Obama sent a signed treaty to the U.S. Senate during the waning days of his administration, but the Senate never acted on it.

While on stage, Mr. Trump signed what he said was a message asking the Senate to discontinue the treaty ratification process “and to return the now-rejected treaty right back to me in the Oval Office where I will dispose of it.”

“By taking these actions, we are reaffirming that American liberty is sacred and that American citizens live by American laws — not the laws of foreign countries,” he said.

The crowd cheered and applauded as he signed and displayed the document. Mr. Trump made the announcement while addressing the annual leadership forum hosted by the NRA’s legislative-lobbying arm.

The president said that even NRA officials didn’t know the announcement was coming ahead of time.

“So they’re listening in this big room someplace — they’re saying ‘I wonder what he’s going to do,’” he said. “The good thing with me — you never know. That’s why we’re making trade deals that are so good for our country.”

Chris Cox, the executive director of the NRA’s legislative-lobbying arm, cheered the move after Mr. Trump’s address.

“President Trump is going to tear up the United Nations gun ban treaty,” Mr. Cox said to cheers. “Barack Obama and John Kerry tried to force us to accept international gun control under the power of the U.N., but Donald Trump [just] said, ‘not on my watch.’”

Sen. Robert Menendez of New Jersey, the top Democrat on the Senate Foreign Relations Committee, immediately criticized the move.

“Walking away from the Arms Trade Treaty is not simply an error; it’s dangerous and sends a message of irresponsibility to all Americans, our international allies and our adversaries,” he said.

A senior administration official said the president will send a letter to the U.N. “in the coming days” to revoke U.S. participation in the treaty.

The official said the administration has “significant concerns” about possible amendments to the treaty in 2020 that could further “constrain” the U.S.

Russia and China, which the official called “top exporters of conventional arms,” are not parties to the treaty. The official said the U.S. already has “significant controls” in place to regulate arms transfers, but Moscow and Beijing are not bound by such restrictions.

⦁ Dave Boyer contributed to this report.