The behavior of cosmological evolution is studied in the case when a phantom fluid that contributes to the accelerated expansion of the Universe is introduced in an $F(R)$ model. At the early stages of the history of the Universe, the dark fluid is seen to give rise to a deceleration of its expansion. For $t$ close to present time it works as an additional contribution to the effective cosmological constant and, later, it produces the transition to a phantom era, which could actually be taking place right now in some regions of the cosmos, and might have observable consequences. For $t$ close to the rip time, the Universe becomes completely dominated by the dark fluid, whose equation of state is phantomlike at that time. Our model, which is able to reproduce the dark energy period quite precisely, may still be modified in such a way that the epoch dominated by an effective cosmological constant---produced by the $F(R)$ term and by the dark fluid contribution---becomes significantly shorter, which is what happens when a matter term is included. The dark fluid with phantom behavior gives rise to a superaccelerated phase, as compared with the case where just the viable $F(R)$ term contributes. It is also seen explicitly that an $F(R)$ theory can be constructed from a phantom model in a scalar-tensor theory, in which the scalar field does not behave as phantom (in the latter case the action for $F(R)$ would be complex). Promising $F(R)$ models that are able to cross the phantom divide in a convenient way are constructed explicitly.