While its numbers are still recovering after reaching the brink of extinction, an elephant seal resting on a beach in California was fatally shot by a man, who is now sentenced to three months in prison on Monday, prosecutors said.

The man was identified as Jordan Gerbich, 30, who now lives in Utah. Gerbich shot the elephant seal in the head using a handgun on Sept. 28, 2019, near San Simeon on California's central coast. 

When asked for comment on Tuesday night, NBC News said the federal public defender of Gerbich did not respond to the request.

However, the attorney earlier said in a court document he submitted before the sentencing that the killing was so unusual and troubling that even Gerbich was shocked and knew it was wrong. 

The attorney cited Gerbich's past history of substance abuse and childhood physical abuse. The lawyer also said that Jordan Gerbich was neglected when he was a kid that left him with a need for approval.

That's why when an intoxicated friend asked him to shoot the elephant seal as a kind of "grotesque test," Gerbich killed the marine mammal.

READ NEXT: Colorado Set to Legalize Human Composting to Turn Corpses to Soil

'Not an Accident'

But in the document that they submitted, prosecutors noted that the killing did not happen accidentally or on a whim. Prosecutors said that Jordan Gerbich, together with this friend, drove out to a place where they knew elephant seals haul out, and Gerbich brought a gun with him.

Moreover, the prosecutors noted that the shooting happened at night, and Gerbich even used a flashlight when he shot the animal on the beach in the Piedras Blancas Rookery.

The National Oceanic and Atmospheric Administration (NOAA) detailed what they found at the scene. NOAA said the elephant seal has shot in the head with its tail fins cut off and cut open.

Under the Marine Mammal Protection Act, northern elephant seals are protected. The act prohibits the "take" of marine mammals, including harassment, capturing, hunting, or killing in U.S. waters.

The NOAA noted that northern elephant seals were once thought to be extinct due to commercial hunting in the 1900s, but their numbers eventually recovered.

Jordan Gerbich pleaded guilty to one count of illegally taking a marine mammal last December. He will also have to undergo a year of supervised release after his prison term, three months of home detention, and 120 hours of community service.

The U.S. Attorney's Office said he would also have to pay a $1,000 fine, The Associated Press reported. According to NOAA, the populations of northern elephant seals in the U.S. and Mexico were initially derived from a few hundred individuals surviving in Mexico.

The agency noted that the largest colonies of northern elephant seals could be found off southern California in the Channel Islands. 

READ MORE:  Endangered California Condor to Return to its Original Habitat After a Century

WATCH: Man Sentenced to Prison For Fatally Shooting Elephant Seal in California - Yours News