We report on atomistic simulation of the folding of a natively-knotted protein, MJ0366, based on a realistic force field. To the best of our knowledge this is the first reported effort where a realistic force field is used to investigate the folding pathways of a protein with complex native topology. By using the dominant-reaction pathway scheme we collected about 30 successful folding trajectories for the 82-amino acid long trefoil-knotted protein. Despite the dissimilarity of their initial unfolded configuration, these trajectories reach the natively-knotted state through a remarkably similar succession of steps. In particular it is found that knotting occurs essentially through a threading mechanism, involving the passage of the C-terminal through an open region created by the formation of the native [Formula: see text]-sheet at an earlier stage. The dominance of the knotting by threading mechanism is not observed in MJ0366 folding simulations using simplified, native-centric models. This points to a previously underappreciated role of concerted amino acid interactions, including non-native ones, in aiding the appropriate order of contact formation to achieve knotting.