Pejic went on trial at Conference Premier club York City in February 2009, playing in a reserve-team match against Grimsby Town. On 20 February 2009, he signed for the club on a contract until the end of 2008–09. His debut came in a 2–0 victory over Havant & Waterlooville in the fourth round of the FA Trophy on 21 February 2009. There were teams in the United States interested in signing Pejic at the end of the season, but he said "I'm keeping my options open and anything could happen yet." He started in the 2009 FA Trophy Final at Wembley Stadium on 9 May 2009, which York lost 2–0 to Stevenage Borough. Following the end of the season, during which he made 19 appearances for York,