We propose a model based on the SU (3) C ⊗ SU (3) L ⊗ U (1) X gauge symmetry with an extra S 3 ⊗ Z 2 ⊗ Z 4 ⊗ Z 12 discrete group, which successfully accounts for the SM quark mass and mixing pattern. The observed hierarchy of the SM quark masses and quark mixing matrix elements arises from the Z 4 and Z 12 symmetries, which are broken at a very high scale by the SU (3) L scalar singlets (σ ,ζ ) and τ , charged under these symmetries, respectively. The Cabbibo mixing arises from the down-type quark sector whereas the up quark sector generates the remaining quark mixing angles. The obtained magnitudes of the CKM matrix elements, the CP violating phase, and the Jarlskog invariant are in agreement with the experimental data.