The commutant of the Cartan subalgebra of G
2 in its enveloping algebra is determined, showing that it gives rise to a 66-dimensional polynomial algebra of sixth order. It is shown that the commutant of the regular subalgebra A
2 can be obtained by restriction. An illustration how to use these results for Hamiltonian systems with G
2 as spectrum generating algebra is given.