two vertices $u,v \in V(C)$ that are at maximum distance with respect to the subgraph $C$. Let $P$ be a shortest path in $G$ joining $u$ and $v$. Starting from $p_1:=u$, let $p_i$ denote the $i-$th vertex of $P$ that is on $C$. Observe that for all $i$, the subpath $P_i$ of $P$ joining $p_i$ and $p_{i+1}$ has no internal vertex on $C$.

Suppose that $P_i$ has strictly less than $d_C(p_i,p_{i+1})$ edges, for some $i\geq 1$. Then $P_{i} \cup C$ contains two cycles that are smaller than $C$, the largest of which has length at least $\frac{|C|}{2} > g/2 \geq \ell-\frac{1}{2} $. This contradicts the minimality of $C$. We conclude that $d_P(p_i,p_{i+1})\geq d_C(p_i,p_{i+1})$, for all $i\geq 1$. Combining this with the triangle inequality, we obtain $d_C(u,p_j) \leq \sum_{i=1}^{j-1} d_C(p_i,p_{i+1}) \leq \sum_{i=1}^{j-1} d_P(p_i,p_{i+1}) = d_P(u,p_j)$, for all $j\geq 2$. In particular, it follows that $g/2 \leq \lfloor \frac{|C|}{2} \rfloor = d_C(u,v) \leq d_P(u,v) \leq \text{diam}(G) <  g/2$; contradiction.

For all integers $\ell\geq 2$ and $k\geq 1$, we define $g(k,\ell):=8(\ell-1) \cdot (\log_2(k\ell)+1)$ and $g(0,\ell):=0$. We are now ready to prove our main theorem, a slightly refined version of Theorem \[thm:longcycles\].

\[thm:main\] Let $\ell\geq 2$ be an integer. Call a cycle *long* if 