  We analyze a possibility for odd-frequency pairing near a quantum critical
point(QCP) in a metal. We consider a model with dynamical pairing interaction
$V(\Omega_n)\sim 1/|\Omega_n|^\gamma$ (the $\gamma$-model). This interaction
gives rise to a non-Fermi liquid in the normal state and is attractive for
pairing. The two trends compete with each other. We search for odd-frequency
solutions for the pairing gap $\Delta (\omega_m)= -\Delta(\omega_m)$. We show
that for $\gamma <1$, odd-frequency superconductivity looses the competition
with a non-Fermi liquid and does not develop. We show that the pairing does
develop in the extended model in which interaction in the pairing channel is
larger than the one in the particle-hole channel. For $\gamma >1$, we argue
that the original model is at the boundary towards odd-frequency pairing and
analyze in detail how superconductivity is triggered by a small external
perturbation. In addition, we show that for $\gamma >2$, the system gets frozen
at the critical point towards pairing in a finite range in the parameter space.
This give rise to highly unconventional phase diagrams with flat regions.
