  Let G be a group of permutations of a denumerable set E. The profile of G is
the function phi which counts, for each n, the number phi(n) of orbits of G
acting on the n-subsets of E. Counting functions arising this way, and their
associated generating series, form a rich yet apparently strongly constrained
class. In particular, Cameron conjectured in the late seventies that, whenever
the profile phi(n) is bounded by a polynomial -- we say that G is
P-oligomorphic --, it is asymptotically equivalent to a polynomial. In 1985,
Macpherson further asked whether the orbit algebra of G -- a graded commutative
algebra invented by Cameron and whose Hilbert function is phi -- is finitely
generated.
  In this paper we establish a classification of (closed) P-oligomorphic
permutation groups in terms of finite permutation groups with decorated blocks.
  It follows from the classification that the orbit algebra of any
P-oligomorphic group is isomorphic to (a straightforward quotient of) the
invariant ring of some finite permutation group. This answers positively both
Cameron's conjecture and Macpherson's question. The orbit algebra is in fact
Cohen-Macaulay; therefore the generating series of phi is a rational fraction
whose numerator has positive coefficients, while the denominator admits a
combinatorial description.
  In addition, the classification provides a finite data structure for encoding
closed P-oligomorphic groups. This paves the way for computing with them and
enumerating them as well as for proofs by structural induction. Finally, the
relative simplicity of the classification gives hopes to extend the study to,
e.g., the class of (closed) permutations groups with sub-exponential profile.
  The proof exploits classical notions from group theory -- notably block
systems and their lattice properties --, commutative algebra, and invariant
theory.
