Considering the nature of the American Civil War were their special units/tactics created to deal with espionage and guerilla warfare?

by [deleted]

*there

Georgy_K_Zhukov

Yes.

Not to say it was effective, but in Missouri, which was perhaps the most plagued region when it came to Confederate guerrilla attacks, General Order #19 was issued in July 22, 1862, requiring all men who were able to report for duty with the state militia to try and deal with the guerrilla problem. Of course, this wasn't actually a good idea, for a number of reasons. First off, a lot of Missourians were on the fence, and apparently it simply drove many to actually decide to throw their lot in with the Confederacy! And second, while 52,000 men did report for duty, they were almost uniformly poor quality soldiers, both in training and equipment. While a reasonably OK deterrent force to keep guerrillas or partisan rangers from entering a town that was prewarned, when out on anti-guerrilla patrols, it was really in their interest to not find anything, since they almost always ended up on the bad side of that fight.

I would very much recommend American Civil War Guerrilla Tactics by Sean McLachlan for further reading.