After government forces withdraw from most Kurdish areas in 2012, the PYD and its YPG militia consolidate control and declare autonomous cantons in Afrin, Kobani and Jazira from late 2013 — the origin of the self-administration later formalised as AANES.
See this event in the timeline Interactive: select this record and follow what connects to it.