We prove a prime decomposition theorem for string links in a thickened surface. Namely, we prove that any non-braid string link [Formula: see text], where [Formula: see text] is a compact orientable (not necessarily closed) surface other than [Formula: see text], can be written in the form [Formula: see text], where [Formula: see text] is prime string link defined up to braid equivalence, and the decomposition is unique up to possibly permuting the order of factors in its right-hand side.