A man arrested at a Donald J. Trump rally in Las Vegas on Saturday told the authorities that he had intended to kill Mr. Trump, according to a complaint filed Monday in United States District Court in Nevada.

The man, Michael Steven Sandford, was arrested after trying to grab an officer’s gun from her holster, the complaint said, and had lingered near the officer, telling her he wanted Mr. Trump’s autograph.

In an interview after his arrest, the complaint says, Mr. Sandford told the authorities that he “made a conscious effort to come to Las Vegas to kill Trump,” and that he had been “planning to attempt to kill Trump for about a year.” He also said that he expected to be killed by law enforcement personnel during his attempt on Mr. Trump’s life.