Authorities in Florida have arrested a man accused of throwing a live alligator through a restaurant’s drive-through window.

Investigators identified Joshua James, of Jupiter, Fla., as the man who tossed the 3½-foot reptile into a Wendy’s last fall, according to a Florida Fish and Wildlife Conservation Commission incident report.

He faces three charges related to the incident: aggravated assault with a deadly weapon; unlawful sale, possession or transporting of an alligator; and petty theft. James, 24, was taken into custody and booked into the Palm Beach County Detention Center on Monday, as first reported by NBC affiliate WPTV.

The driver, wearing a baseball hat backward, arrived at the drive-through window to receive a large drink just before 1:30 a.m. on Oct. 11, according to the report’s summary of surveillance footage.

[Alligator pear salad: The strange foods that Americans loved a century ago]

Joshua James's booking photo. (Palm Beach County Sheriff's Office)

“While the attendant has her back to the window and is at her register, the male driver reaches across the inside of his vehicle in the passenger area and throws an alligator from his vehicle into the drive through window,” the report reads.

A photograph in the report shows the American alligator flat with its legs splayed on the fast-food restaurant’s kitchen floor. An officer responding to the incident captured the alligator, taped its jaws shut “for safety” and released it into a nearby canal, according to the report.

An average female American alligator grows to just over eight feet in length,according to the National Zoo. The average male grows to just over 11 feet in length. The alligator thrown through the Wendy’s drive-through window was just 3½ feet long.

The officer later viewed surveillance footage from an adjacent gas station, which shows what appears to be the same driver acting “suspiciously” minutes before the incident.

“The driver exited his vehicle by pulling himself up and out of the window of his door instead of opening the door itself,” the investigator notes, adding that the driver and a passenger later “continuously” look through the driver’s side window at something inside.

Once approached by authorities, James admitted to having picked up the alligator along the side of a road, driving to Wendy’s and throwing the beast through the drive-through window.

A judge on Tuesday ordered James to stay away from all Wendy’s restaurants, to avoid possessing any weapons, to get a mental health evaluation and to limit his contact with animals to his mother’s dog, according to WPTV.

James’s parents described him to the TV station as an outdoorsman and harmless prankster, adding that he viewed famous crocodile hunter and conservationist Steve Irwin as an idol.

[Ten-foot alligator spotted in minor league baseball dugout]

Ed and Linda James told the station that their son was pranking a Wendy’s employee whom he knew.

“It was just a stupid prank that he did that’s now turning into this; it’s stupid,” his mother told WPTV. “He’s a prankster. He does stuff like this because he thinks it’s funny.”

The American alligator is listed as “a species of special concern” in Florida, according to the state Fish and Wildlife Conservation Commission, which notes that â€œstate law prohibits killing, harassing or possessing alligators.”

Nationally, the American alligator population “reached all-time lows in the 1950s, primarily due to market-hunting and habitat loss,” according to the U.S. Fish and Wildlife Service. But in 1987, the alligator — a member of the crocodile family — “was pronounced fully recovered, making it one of the first endangered species success stories,” according to the government.

Still, the American alligator is a federally protected species, according to the Fish and Wildlife Service, which notes:

Although the American alligator is secure, some related animals — such as several species of crocodiles and caimans — are still in trouble. For this reason, the Fish and Wildlife Service continues to protect the alligator under the ESA classification as “threatened due to similarity of appearance.” The Service thus regulates the harvest of alligators and legal trade in the animals, their skins, and products made from them, as part of efforts to prevent the illegal take and trafficking of endangered “look-alike” reptiles.

According to the Florida Fish and Wildlife Conservation Commission, the state averages about five unprovoked alligator bites per year.

Since 1948, those “unprovoked bites” have resulted in 22 deaths in Florida.