The competition among multiple solid phases determines the final microstructures of a material. Such competition can originate at the very beginning of the solidification process. We report the results of molecular dynamics simulation of the phase competition between the hexagonal close-packed (hcp), facecentered cubic (fcc), and body-centered cubic (bcc) phases during the solidification of pure Tb. We found that the liquid supercooled below the hcp melting temperature has both bcc and hcp/fcc nuclei, but only the bcc nuclei grow such that the liquid always solidifies into the bcc phase, even at temperatures where the hcp phase is more stable. The hcp phase can only form in the last liquid droplet or at the bcc grain boundaries. Depending on the bcc grain orientations, the hcp phase jammed between the bcc grains either completely disappears or slowly grows via a solid-state massive transformation mechanism. Once the hcp phase becomes large enough, the stresses associated with its appearance can trigger a martensitic transformation. Yet, not the entire bcc phase is consumed by the martensitic transformation and the remaining bcc phase is transformed into the hcp phase via the solid-state massive transformation mechanism. Finally, if the supercooling is too large, the nucleation becomes almost barrier free and the liquid solidifies into a structure consisting of ultrafine hcp and bcc grains after which the bcc phase quickly disappears.