A Maryland man is in hot water with the law after he posted a video on social media that appeared to show him jumping into the water to attack a federally protected pelican in the Florida Keys, The Baltimore Sun reported.

>> Read more trending news

Maryland State Police said in a release that 31-year-old William Hunter Hardesty has been arrested at a hotel in Ocean City, Maryland.

Monroe County State Attorney Dennis Ward told The Miami Herald the charges amount to five misdemeanors. Hardesty is being held as a fugitive in the Worcester County Detention Center, awaiting extradition to Florida.

News outlets report the Florida Fish and Wildlife Conservation Commission investigated the video of Hardesty trying to capture a brown pelican at Florida’s Key West Historic Seaport. The video was taken March 5 and posted on his Facebook page March 8.

In the video, Hardesty appears to lean over a harbor edge, holding something to entice the bird. As the pelican draws closer, Hardesty appears to jump into the water on top of the bird, the Sun reported.

As the video continues, the pelican tries to fight back and snaps its beak across Hardesty's face before swimming away, the Miami Herald reported.

“If you don’t get out of there right now, I’m going to call security,” a woman off camera tells Hardesty. “You guys, knock this party off now.”

Florida law prohibits anyone from even trying to attract a pelican, the Herald reported.

Hardesty did not apologize and offered no reasons on social media why he attacked the pelican, the newspaper reported. When some Facebook posters complained about the video -- including some posters who laced their comments with profanity -- Hardesty fired back.

"Next time ima (sic) eat him for dinner!! Wonder what they taste like," he wrote, according to the Herald.

Hardesty reacted on Friday, the newspaper reported, writing on Facebook that “The book blowin’ up on a Friday!! Sheesh.”

Monroe County Sheriff Rick Ramsay posted on Facebook that his department had contacted the Florida Fish and Wildlife Conservation Commission about charges against Hardesty.

“He will be held accountable for his attack on wildlife,” Ramsay wrote.

Bobby Dube, a spokesman for the FWC’s Florida Keys division, said his department is working with the state attorney’s office.

"We never want to harm wildlife, and that's what he was doing," Dube told the Sun. "He was enticing the pelican and then jumped on it."

The Associated Press contributed to this report.