  Let $G$ be a finite group minimally generated by $d(G)$ elements and
$\Aut_c(G)$ denote the group of all (conjugacy) class-preserving automorphisms
of $G$. Continuing our work [Class preserving automorphisms of finite
$p$-groups, J. London Math. Soc. \textbf{75(3)} (2007), 755-772], we study
finite $p$-groups $G$ such that $|\Aut_c(G)| = |\gamma_2(G)|^{d(G)}$, where
$\gamma_2(G)$ denotes the commutator subgroup of $G$. If $G$ is such a
$p$-group of class $2$, then we show that $d(G)$ is even, $2d(\gamma_2(G)) \le
d(G)$ and $G/\Z(G)$ is homocyclic. When the nilpotency class of $G$ is larger
than $2$, we obtain the following (surprising) results: (i) $d(G) = 2$. (ii) If
$|\gamma_2(G)/\gamma_3(G)| > 2$, then $|\Aut_c(G)| = |\gamma_2(G)|^{d(G)}$ if
and only if $G$ is a $2$-generator group with cyclic commutator subgroup, where
$\gamma_3(G)$ denotes the third term in the lower central series of $G$. (iii)
If $|\gamma_2(G)/\gamma_3(G)| = 2$, then $|\Aut_c(G)| = |\gamma_2(G)|^{d(G)}$
if and only if $G$ is a $2$-generator $2$-group of nilpotency class $3$ with
elementary abelian commutator subgroup of order at most $8$. As an application,
we classify finite nilpotent groups $G$ such that the central quotient
$G/\Z(G)$ of $G$ by it's center $\Z(G)$ is of the largest possible order. For
proving these results, we introduce a generalization of Camina groups and
obtain some interesting results. We use Lie theoretic techniques and computer
algebra system `Magma' as tools.
