Proof.
The sufficiency part is evident, and we only need to prove the necessity part.

By the hypothesis, |ℳ𝒮(G)|≤3. We claim that
(1)1∉ℳ𝒮(G).

Otherwise, assume that 1∈ℳ𝒮(G). Then G has at most two classes of nonnormal maximal subgroups of the same order. Since G is nonsolvable, one has G/S(G)≅PSL(2,7) by Lemmas 7 and 8. It is easy to see that 𝒩𝒞(G/S(G))⊆𝒩𝒞(G) and |𝒩𝒞(PSL(2,7))|>3. It follows that |𝒩𝒞(G)|>3, a contradiction. Thus, 1∉ℳ𝒮(G).

Since |ℳ𝒮(G)|≤3, we have that G has at most three classes of maximal subgroups of the same order.

By Lemma 9 (1), G cannot have exactly one class of maximal subgroups of the same order.

If G has exactly two classes of maximal subgroups of the same order, according to Lemma 9 (2), one has G/Φ(G)≅ℤ23i⋊PSL(2,7) since G has no normal maximal subgroups, where i=0,1,…. Since |𝒩𝒞(ℤ23i⋊PSL(2,7))|>3, it follows that |𝒩𝒞(G)|>3, a contradiction.

Thus, G has exactly three classes of maximal subgroups of the same order. By Lemma 9 (3), G/S(G) might be isomorphic to A6 or PSL(2,q), q=11,13,23,59,61 or PSL(3,3) or U3(3) or PSL(5,2) or PSL(2,2f), and f is a prime or PSL(2,7)×PSL(2,7)×⋯×PSL(2,7). If G/S(G) is an isomorphism to A6 or PSL(2,q), q=11,23,59,61 or PSL(3,3) or U3(3) or PSL(5,2) or PSL(2,2f), and f is an odd prime or PSL(2,7)×PSL(2,7)×⋯×PSL(2,7). It is easy to see that |𝒩𝒞(G/S(G))|>3 by [8, 9], which implies that |𝒩𝒞(G)|>3, a contradiction. Thus, G/S(G)≅PSL(2,4)≅PSL(2,5) or PSL(2,13).

Note that 1∉ℳ𝒮(G) and |ℳ𝒮(G)|=|𝒩𝒞(G)|=3. It follows that 1∉𝒩𝒞(G), so S(G) is cyclic. We claim that
(2)Φ(G)=S(G).

Otherwise, assume that Φ(G)<S(G). Let M be a maximal subgroup of G such that S(G)≰M. Then G=S(G)M. It is obvious that S(G)∩M⊴M. Moreover, S(G)∩M⊴S(G), since S(G) is cyclic. It follows that S(G)∩M⊴G. Therefore, G/(S(G)∩M)=S(G)/(S(G)∩M)⋊M/(S(G)∩M). Let G-=G/(S(G)∩M),S-(G)=S(G)/(S(G)∩M), and M-=M/(S(G)∩M). By N/C-theorem, NG-(S-(G))/CG-(S-(G))≲Aut(S-(G)). That is, G-/CG-(S-(G))=S-(G)M-/CG-(S-(G)))≲Aut(S-(G)). Note that Aut(S-(G)) is abelian since S-(G) is cyclic. Moreover, M-≅S(G)M/S(G)=G/S(G) is a nonabelian simple group and S-(G)M-/CG-(S-(G))≅(S-(G)M-/S-(G))/(CG-(S-(G))/S-(G)). Here S-(G)M-/S-(G)≅M-. Therefore, one has CG-(S-(G))/S-(G)=1 or CG-(S-(G))/S-(G)=S-(G)M-/S-(G)=G-/S-(G). If CG-(S-(G))/S-(G)=1, it follows that S-(G)M-/S-(G)≲Aut(S-(G)) is abelian, a contradiction. If CG-(S-(G))/S-(G)=G-/S-(G), then S-(G)≤Z(G-). It follows that G-=S-(G)×M- and then M⊴G; this contradicts that all maximal subgroups of G are nonnormal. Thus, our assumption is not true, so Φ(G)=S(G).

It follows that G/Φ(G)≅PSL(2,5) or PSL(2,13).

If Φ(G)=1, then G≅PSL(2,5) or PSL(2,13).

Next, suppose that Φ(G)≠1. Let p be any prime divisor of |Φ(G)|. We claim that p≯2. Otherwise, assume that p>2. Let T be a subgroup of Φ(G) such that Φ(G)/T≅ℤp. That is, Φ(G/T)≅ℤp. Then (G/T)/ℤp≅(G/T)/Φ(G/T)=(G/T)/(Φ(G)/T)≅G/Φ(G)≅PSL(2,5) or PSL(2,13). Since p>2 and Schur multipliers of both PSL(2,5) and PSL(2,13) are ℤ2, we have that G/T≅PSL(2,5)×ℤp or PSL(2,13)×ℤp. Note that |𝒩𝒞(PSL(2,5)×ℤp)|>3 and |𝒩𝒞(PSL(2,13)×ℤp)|>3. It follows that |𝒩𝒞(G)|>3, a contradiction. Thus, p≯2, so Φ(G) is a cyclic 2-group. If |Φ(G)|=2n>2, let L be a subgroup of Φ(G) such that Φ(G)/L≅ℤ2. Then (G/L)/ℤ2≅(G/L)/Φ(G/L)=(G/L)/(Φ(G)/L)≅G/Φ(G)≅PSL(2,5) or PSL(2,13). We have that G/L≅SL(2,5) or SL(2,13). Let M be a subgroup of L such that L/M≅ℤ2. Then (G/M)/ℤ2≅(G/M)/(L/M)≅G/L≅SL(2,5) or SL(2,13). Since Schur multipliers of both SL(2,5) and SL(2,13) are trivial, we have that G/M≅SL(2,5)×ℤ2 or SL(2,13)×ℤ2; this contradicts that all maximal subgroups of G are nonnormal. Thus, |Φ(G)|=2. It follows that G≅SL(2,5) or SL(2,13).