P-quotient-pullbackable implies inner

Statement
Suppose $$p$$ is a prime number and $$P$$ is a p-group, i.e., a group in which the order of every element is a power of $$p$$ and $$\sigma$$ is an automorphism of $$P$$.

Suppose that, for any p-group $$Q$$ and surjective homomorphism $$f:Q \to P$$, there exists an automorphism $$\sigma'$$ of $$Q$$ such that $$f \circ \sigma' = \sigma \circ f$$. Then, $$\sigma$$ is an inner automorphism of $$P$$.