Let $$(M,g)$$ ( M , g ) be a closed Riemannian manifold of dimension $$n \ge 2$$ n ≥ 2 . In Ceccon and Montenegro (Math Z 258:851–873, 2008; J Diff Equ 254(6):2532–2555, 2013) showed that, for any $$1 < p \le 2$$ 1 < p ≤ 2 and $$1 \le q < r < p^* = \frac{np}{n-p}$$ 1 ≤ q < r < p ∗ = n p n - p , there exists a constant $$B$$ B such that the sharp Gagliardo–Nirenberg inequality $$\begin{aligned} \left( \int _M |u|^r\; \mathrm{d}v_g \right) ^{\frac{p}{r \theta }} \le \left( A_{\mathrm{opt}} \int _M |\nabla _g u|^p\; \mathrm{d}v_g + B \int _M |u|^p\; \mathrm{d}v_g \right) \left( \int _M |u|^q\; \mathrm{d}v_g \right) ^{\frac{p(1 - \theta )}{\theta q}}. \end{aligned}$$ ∫ M | u | r d v g p r θ ≤ A opt ∫ M | ∇ g u | p d v g + B ∫ M | u | p d v g ∫ M | u | q d v g p ( 1 - θ ) θ q . holds for all $$u \in C^\infty (M)$$ u ∈ C ∞ ( M ) . In this work, assuming further $$1 < p < 2, p < r$$ 1 < p < 2 , p < r and $$1 \le q \le \frac{r}{r-p}$$ 1 ≤ q ≤ r r - p , we derive existence and compactness results of extremal functions corresponding to the saturated version of the above sharp inequality. Sobolev inequality can be seen as a limiting case as $$r$$ r tends to $$p^*$$ p ∗ .