An EMT and former military police officer videotaped himself swallowing a bullet with a beer chaser before prosecutors say he fatally shot a rookie Stoneham firefighter at point-blank range during a drunken game of dare between friends.

When first responders found David Atherton, 24, dead on his back and drenched in blood late Tuesday night on the kitchen floor of his Congress Street apartment in Stoneham, authorities said his childhood pal Patrick Riccardi-O’Connor told them through tears Atherton had killed himself after asking him, “Do you trust me?”

“They were drinking in the deceased’s home. At 10:10 or thereabouts last night, Stoneham police received a 911 call. Initially the defendant reported that the deceased had shot himself,” Adrienne Lynch, chief of homicide prosecutions for Middlesex District Attorney Marian T. Ryan, said yesterday at Riccardi-O’Connor’s arraignment in Woburn District Court.

“It was learned through another individual that was present that the deceased and the defendant had been videotaping themselves during the course of the evening fooling around with the gun, pointing it at each other,” Lynch said.

She said Riccardi-O’Connor had been tossing back funnel shots of beer, “and in one of the videos it shows the defendant actually ingesting one of the bullets.”

Lynch said it was only after police confronted Riccardi-O’Connor with the video evidence that he acknowledged “he had been fooling around with the gun and pointed it at the victim and pulled the trigger, but did not expect that a bullet would come out.”

Atherton, an Army National Guard veteran, rode with the Stoneham Fire Department’s Group 3. He had been on the job only four months, and graduated from the state Firefighting Academy barely three weeks ago.

“Firefighter David Atherton was new to our department, but had already given a lifetime’s worth of dedicated service to his fellow man,” Stoneham fire Chief Matthew Grafton said in a statement.

Atherton, he said, was “selfless and dedicated,” even after losing both his parents while he was still a young boy.

“I cannot help but feel that the best was yet to come for this young man,” said Grafton, noting he will be buried with full military and fire department honors.

A stricken-looking Riccardi-O’Connor, 23, of Stoneham was released yesterday to a 6 p.m. curfew on $25,000 cash bail and a GPS bracelet by Judge Michael Brooks after pleading not guilty to involuntary manslaughter, assault and weapon charges.

Lynch told the judge that Riccardi-O’Connor, an EMT, was licensed to carry the gun. That license was revoked yesterday morning, she said.

Riccardi-O’Connor’s family fled reporters outside the courthouse.

Defense attorney Andrea Levy told reporters Riccardi-O’Connor joined the Army National Guard after high school and served a year in the Middle East as an MP.

“He continues to serve his community — he’s an EMT,” Levy said. She declined to say where or whether he and Atherton had been abroad together for the Guard.

Police said there was at least one other witness in the apartment when the shot was fired, but that man told investigators he was in the bathroom when it happened.

Atherton grew up in the town where he died and graduated from Stoneham High School in 2011. Grafton said Atherton was deployed to Qatar in 2012 to 2013 and received the Army Commendation Medal.