What is the Origin of the Beagle?

Beagles were originally bred for the keen sense of smell, and used for tracking things like rabbits and other small game. They are starting to use them these days for detection dogs.