Let F k be the free group on k generators. A word w ∈ F k is called primitive if it belongs to some basis of F k . We investigate two criteria for primitivity, and consider more generally subgroups of F k which are free factors.The first criterion is graph-theoretic and uses Stallings core graphs: given subgroups of finite rank H ≤ J ≤ F k we present a simple procedure to determine whether H is a free factor of J. This yields, in particular, a procedure to determine whether a given element in F k is primitive.Again let w ∈ F k and consider the word map w: G × … × G → G (from the direct product of k copies of G to G), where G is an arbitrary finite group. We call w measure preserving if given uniform measure on G × … × G, w induces uniform measure on G (for every finite G). This is the second criterion we investigate: it is not hard to see that primitivity implies measure preservation, and it was conjectured that the two properties are equivalent. Our combinatorial approach to primitivity allows us to make progress on this problem and, in particular, prove the conjecture for k = 2.It was asked whether the primitive elements of F k form a closed set in the profinite topology of free groups. Our results provide a positive answer for F 2.