TAMPA, Fla. (WFLA) — An hours-long search for a teen suspected of carjacking a vehicle ended in an arrest in a muddy ditch in Flagler County, authorities said.

Around 4:15 a.m., the Flagler County Sheriff’s Office was told to be on the lookout for an armed carjacking suspect who reportedly stole a pickup truck that was being used as a street sweeper in Daytona Beach.

Deputies spotted the vehicle a short time later, and saw the suspect get out of the truck and start running down a street with a gun in his hand, but they lost sight of him.

The sheriff’s office called in K9 teams and a helicopter to assist in the search, and formed a perimeter in the area of Point Pleasant and Point of Woods Drive in Palm Coast.

About three hours later, deputies got a tip about a man fitting the description walking in someone’s backyard.

Once they were able to zero in on the suspect, a deputy tackled him into the ground. Authorities said the teen and the deputy landed in a muddy ditch and both suffered injuries, but are expected to be okay.

Davis-Jones was arrested on charges of resisting an officer without violence, providing a false name to law enforcement, violation of probation and felony trespass on a construction site. Once he’s released from the hospital, he will be be taken to the Flagler County jail dubbed the “Green Roof Inn.”

It’s unclear if more charges are pending. The Daytona Beach Police Department will be investigating the armed carjacking.

Authorities said Davis-Jones is no stranger to law enforcement. Records show the 18-year-old has been arrested for 18 misdemeanors and 18 felonies in the state of Florida. He is currently on probation, according to the sheriff’s office.

“Another outstanding job by the team getting this dangerous criminal off the streets,” Sheriff Rick Staly said. “The juvenile justice system failed this kid by giving him chance after chance. This kid is never going to learn his lesson so now that he is an adult the system needs to hold him accountable and send him away before he seriously hurts or kills someone. I’m glad that Deputy Clay is expected to make a full recovery!”