Maximal elementary abelian subgroup of order four implies subgroup rank at most four

Statement
Suppose $$P$$ is a group whose order is a power of two, having an elementary abelian subgroup of order four (namely a Klein four-group) that is not contained in any bigger elementary abelian subgroup. In other words, $$P$$ is a fact about::group of prime power order having a maximal elementary abelian subgroup of prime-square order.

Then, the subgroup rank of $$P$$ is at most four. In other words, every subgroup of $$P$$ is generated by a subset of size at most four.

Related facts

 * Maximal elementary abelian subgroup of prime-square order implies normal rank at most the prime