We construct an exact solution of the Friedmann equations with a phantom scalar matter field originating in string field theory and show the absence of the big-rip singularity. The notable features of the model are a ghost sign of the kinetic term and a special polynomial form of the effective tachyon potential. The constructed solution is stable under small fluctuations of the initial conditions and special variations of the form of the potential.at the 0.95 confidence level. From the theoretical standpoint, this range of w covers three essentially different cases: w > −1, w = −1, and w < −1.• The first case, w > −1, is achieved in the quintessence models [9]-[11], which are cosmological models with a scalar field. Models of this type are quite acceptable, but there is a question of the origin of the scalar field. To comply with experimental astronomical data, this scalar field should be extra-light and therefore does not belong to the standard-model set of fields [12].• The second case, w = −1, is described via the cosmological constant. This scenario is admissible from the general standpoint except for the problem of the order of magnitude of the cosmological constant, which turns out to be 10 120 times less than the natural theoretical prediction [5].