Cyclic codes are a subclass of linear codes and have applications in consumer electronics, data storage systems, and communication systems as they have efficient encoding and decoding algorithms. Let m = 2 ℓ + 1 for an integer ℓ ≥ 1 and π be a generator of GF ( 3 m ) ⁎ . In this paper, a class of cyclic codes C ( u , v ) over GF ( 3 ) with two nonzeros π u and π v is studied, where u = ( 3 m + 1 ) / 2 , and v = 2 ⋅ 3 ℓ + 1 is the ternary Welch-type exponent. Based on a result on the non-existence of solutions to certain equation over GF ( 3 m ) , the cyclic code C ( u , v ) is shown to have minimal distance four, which is the best minimal distance for any linear code over GF ( 3 ) with length 3 m − 1 and dimension 3 m − 1 − 2 m according to the Sphere Packing bound. The duals of this class of cyclic codes are also studied. [ABSTRACT FROM AUTHOR]