Deadwood is an American western television series created, produced, and largely written by David Milch and aired on the premium cable network HBO from March 21, 2004, to August 27, 2006, spanning three 12-episode seasons. The show is set in the 1870s in Deadwood, South Dakota, before and after the area's annexation by the Dakota Territory. The series charts Deadwood's growth from camp to town, incorporating themes ranging from the formation of communities to western capitalism. The show features a large ensemble cast, and many historical figures appear as characters—such as Seth Bullock, Al Swearengen, Wild Bill Hickok, Sol Star, Calamity Jane, Wyatt Earp, George Crook, E. B. Farnum, Charlie Utter, Jack McCall, and George Hearst. The plot lines involving these characters include historical truths as well as substantial fictional elements. Milch used actual diaries and newspapers from 1870s Deadwood residents as reference points for characters, events, and the look and feel of the show. Some of the characters are fully fictional, although they may have been based on actual persons.