A man in South Carolina was arrested after allegedly texting a police officer by mistake in an attempt to sell a gun and marijuana.

After allegedly texting the "wrong number" on Monday, Tondavian Wilson, 31, found himself in a conversation with a deputy from the Chesterfield County Sheriff's Office when trying to sell guns and marijuana.

Deputies began a "text dialogue" with Wilson regarding prices for the firearm and the requested amount of marijuana.

FLORIDA TEEN SHOT IN DRIVE-BY SHOOTING OUTSIDE HIGH SCHOOL

A man in South Carolina was arrested after allegedly texting a police officer by mistake in an attempt to sell a gun and marijuana.

A man in South Carolina was arrested after allegedly texting a police officer by mistake in an attempt to sell a gun and marijuana. (Chesterfield County Sheriff's Office)

Wilson then gave the sheriff's deputies an address which is located in Cheraw, South Carolina, where he was working.

When officials arrived, Wilson was carrying a pistol and a bag that contained more than 90 grams of marijuana, according to the sheriff's office. 

CLICK HERE TO GET THE FOX NEWS APP

Tondavian Wilson, 31 (Chesterfield County Sheriff's Office)

The sheriff's office wrote Wilson was arrested and "dumbfounded by his obvious texting mistake."

Pictures released by the sheriff's office show the pistol and marijuana, which is placed in a plastic bag and mason jar.

Wilson is being charged with possession with intent to distribute marijuana, possession with intent to distribute marijuana within proximity of a school/playground, and possession of a Firearm by a Convicted Felon.