The classes of finite groups with minimal sets of generators of fixed cardinalities, named B-groups, and groups with the basis property, in which every subgroup is a B-group, contain only p-groups and some {p, q}-groups. Moreover, abelian B-groups are exactly p-groups. If only generators of prime power orders are considered, then an analogue of property B is denoted by B pp and an analogue of the basis property is called the pp-basis property. These classes are larger and contain all nilpotent groups and some cyclic q-extensions of p-groups. In this paper we characterise all finite groups with the pp-basis property as products of p-groups and precisely described {p, q}-groups.2010 Mathematics subject classification: primary 20F05; secondary 20D10, 20D60.