When the armed man told the victim to tie his dog to a nearby tree, the victim jumped a 4-foot fence and bolted, leaving the dog behind.

Gainesville police caught an armed robber and stumbled onto a passle of drugs — all in the same case.

Police were called late Thursday by a man who lives in an apartment at 4121 SW 31st Drive, who said he'd been walking his dog when a man, hiding behind a tree and holding what appeared to be a rifle or machine gun-type weapon, confronted him. When the armed man told the victim to tie his dog to a nearby tree, the victim jumped a 4-foot fence and bolted, leaving the dog behind.

A neighbor saw a man matching the armed robber's description hiding behind a nearby car, and police found him after a quick search, an arrest report said. The victim identified the man as the person who tried to rob him.

Searching near where the would-be robber had hidden, police found a pair of discarded latex gloves. Around the corner of the apartment building, they found two 14-by-14-inch boxes filled with several pounds' worth of vacuum-sealed cannabis, the report said. Officers said they didn't know if the boxes came from the robbery victim's apartment, but there were several broken-down, similar looking boxes inside. Officers obtained a search warrant for the apartment and found a large amount of cannabis, cannabis butter, a pill press, handgun and a large sum of money.

Titus Smoaks, 44, a painter by trade whose address was listed at 6103 NW 23rd Terrace, was charged with attempted armed robbery and resisting arrest. He was in the Alachua County Jail Friday and bond was set at $60,000, records show.

Capt. Jorge Campos said during a press briefing Friday that getting a search warrant for a crime victim's apartment is "not a routine thing."

Police don't know if Smoaks and the victim knew each other. The victim in the case, whose name was withheld, is a suspect in the drug investigation, he said, and police are still trying to determine if there are others involved who might be responsible for the drugs.