 The show was produced by Hartswood Films for BBC Wales , while BBC Worldwide also provided co @-@ production funding . Production was also co @-@ produced by PBS , a network of public @-@ service broadcasters in the United States , for WGBH @-@ TV 's Masterpiece Mystery ! strand . Filming of the pilot episode , written by Moffat and directed by Coky Giedroyc , commenced in January 2009 . The following January ( 2010 ) , the first set of three episodes entered production . Paul McGuigan directed the first and third episodes and Euros Lyn directed the second . The three episodes were filmed in reverse order of their broadcast . 
