He woke to a stranger in his home. The man offered to sell him cocaine, cops say

Awakened by a noise at 4:30 a.m., a Berkeley, California, resident flipped on the lights to discover a strange man in his bedroom, police told The Daily Californian.

But what happened next in the June 27 incident was even stranger.

The man claimed to be looking for a different address, then offered to sell the resident cocaine, police told KRON.

When the intruder produced a baggie of white powder, the resident told him to leave and he departed, officers told The Mercury News.

A short time later, officers arrested Jahcoby Dillon Adams-Mabin, 24, of Berkeley on suspicion of burglary, threatening violence to a police officer, felony battery on emergency personnel and possession of a controlled substance, reported Berkeley police.

Officers found Adams-Mabin a short distance away about 45 minutes after the break-in, according to The Mercury News. When police began to search him, Adams-Mabin tried to escape and was tackled by officers, the publication reported.

Police found more than a half-ounce of cocaine on Adams-Mabin, who was treated at the scene for a scrape to his forehead, reported The San Francisco Chronicle. An officer was treated at a hospital for a cut to the forehead.

Sometimes plans don't quite work out as intended. Take a look at some would-be criminals who could have used a practice run or two.