Deadwood is an American Western television series that aired on the premium cable network HBO from March 21, 2004, to August 27, 2006, spanning three seasons and 36 episodes. The series is set in the 1870s in Deadwood, South Dakota, before and after the area's annexation by the Dakota Territory, and charts Deadwood's growth from camp to town. The show was created, produced, and largely written by David Milch. Deadwood features a large ensemble cast headed by Timothy Olyphant and Ian McShane, playing the real-life Deadwood residents Seth Bullock and Al Swearengen, respectively. Many other historical figures appear as characters, including George Crook, Wyatt Earp, E. B. Farnum, George Hearst, Wild Bill Hickok, Calamity Jane, Jack McCall, and Charlie Utter. 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.