For some work in equivariant stable homotopy, I am trying to understand the family of finite $p$-groups $P$ with derived subgroup $P'$ of order $p$. There is a 1999 J. Algebra paper by Simon Blackburn ([Groups of prime power order with derived subgroup of prime order](https://doi.org/10.1006/jabr.1998.7909)) that gives a very detailed classification, but I would like to understand these a bit more conceptually, and don't really care about uniqueness of description.


So I am wondering if my group theory friends can tell me (perhaps with a reference) if it is correct that all such groups can be constructed as follows:


(a) Start with an extra special $p$ group $\widetilde V$, so it sits in a nonsplit short exact sequence
$$ C\_p \rightarrow \widetilde V \rightarrow V,$$
where $V$ is an elementary abelian group of even dimension, and $C\_p = \widetilde V^{\prime}$.


(b) Then pullback via a surjective map $\pi: A \rightarrow V$, where $A$ is an abelian $p$ group, yielding a nonsplit short exact sequence
$$ C\_p \rightarrow \widetilde A \rightarrow A,$$
with $C\_p = \widetilde A^{\prime}$.


(c) [See Derek Holt's example, and ensuing comments.] Note that $Z(\widetilde A) = C\_p \times \ker \pi$. Let $\alpha: C\_p \rightarrow \ker \pi$ be a homomorphism, and let $C < Z(\widetilde A)$ be its graph. Now pushout via an inclusion $C \hookrightarrow C\_{p^k}$, yielding a group $P$.


Then $P$ is a $p$-group of the sort I am interested in: $P' = C\_p$. Furthermore $Z(P) = C\_{p^k} \times \ker \pi$, and $P/Z(P) = V$, which looks rather like the ingredients of Blackburn's classification.


So now my question again: does every finite $p$-group with derived subgroup of order $p$ arise in this way?



Construction of finite $p$-groups with derived subgroup of order $p$?
As I said in my comment, I am not completely sure whether I understand your construction in (c), but the following example is an interesting test case.


Start with an extraspecial group $\langle a,b,c \rangle$ of order $p^3$ and exponent $p$ (with $p$ odd), with $[a,b]=c$ and $c$ central of order $p$.


Now let $A = C\_p \times C\_{p^2}$ surjecting onto $V$, and let $\tilde A$ be the pullback as in (b). So now we still have $a^p=1$, have $b^p=d$ with $d$ central of order $p$ and $\langle d \rangle = \ker \pi$.


Finally take a pushout with $C\_{p^2} = \langle e \rangle$, but using the subgroup $\langle cd \rangle$ of $\tilde A$, so $e^p=cd$.


Now $P = \langle a,b,c,d,e \rangle$ has order $p^5$ with $P' = \langle c \rangle$, and $Z(P)= \langle d,e \rangle$. So we do have $Z(P) = C\_{p^2} \times \ker \pi$, but the element $c \in P'$ is not a $p$-th power in $Z(P)$ (although it is a $p$-th power in $P$).


