The Rottweiler is believed to by descended from ancient Roman drover dogs: mastiff-type dogs described as dependable, rugged, willing workers, with great intelligence and strong guarding instincts. They accompanied the Roman armies over the Alps, herding cattle and guarding supplies at night. They settled around what is now Rottweil, Germany. Rottweilers were used to herd and pull carts until cattle driving was outlawed in the mid-nineteenth century. Their numbers were greatly reduced once their function was severely curtailed. However, in the early twentieth century, they again found favor as a police dog.
References:
American Kennel Club. (2017). 22nd Edition of The New Complete Dog Book : official breed standards and profiles for over 200 breeds.Mount Joy, PA: Fox Chapel Publishing.