Let p be a prime number, k a field of characteristic p and G a finite p-group. Let V be a finite-dimensional linear representation of G over k. Write S = Sym V ∗. For a class of p-groups which we call generalised Nakajima groups, we prove the following: (a) The Hilbert ideal is a complete intersection. As a consequence, for the case of generalised Nakajima groups, we prove a conjecture of Shank and Wehlau (reformulated by Broer) that asserts that if the invariant subring SG is a direct summand of S as SG-modules then SG is a polynomial ring. (b) The Hilbert ideal has a generating set with elements of degree at most |G|. This bound is conjectured by Derksen and Kemper. 2021 American Mathematical Society