A young man, who was drinking and celebrating the Fourth of July, tried to set off a firework from the top of his head, killing him instantly, authorities said Sunday, New York Post reported.

Devon Staples was celebrating America's Independence with a few drinks and fireworks in the company of his friends on Saturday night in the small eastern Maine city of Calais, according to Stephen McCausland, a representative for the state Department of Public Safety. Staples, 22, placed a fireworks mortar tube on the top of his head and lit it, he said, reported the Huffington Post.

The explosion caused a head injury that resulted in his instant death, said McCausland. His death is the first fireworks-related fatality in Maine since the state legalized them in 2012.

"Apparently, he thought that was a great idea," McCausland said. "His friends they thought dissuaded him from doing it, and the next thing they knew, he ignited the fireworks and he was killed instantly," according to ABC News.

Devon's brother Cody Staples, 25, said he was standing not more than five feet away from Devon in a friend's backyard, where the accident took place. He said his brother had a lighter in his hand and he accidentally set off the firework, according to New York Daily News.

"I was the first one who got there. There was no rushing him to the hospital. There was no Devon left when I got there," his brother said. "It was a freak accident ... But Devon was not the kind of person who would do something stupid. He was the kind of person who would pretend to do something stupid to make people laugh."