The effect of spin-polarized current on a domain structure in a magnetic junction consisting of two ferromagnetic metallic layers separated by an ultrathin nonmagnetic layer is studied within a phenomenological theory. The magnetization of one ferromagnetic layer (layer 1) is assumed to be fixed, while that of the other ferromagnetic layer (layer 2) can be freely oriented both parallel and antiparallel to the magnetization of layer 1. Layer 2 can be split into domains. Charge transfer from layer 1 to layer 2 is not attended with spin scattering by the interface but results in spin injection. Due to s-d exchange interaction, injected spins tend to orient the magnetization in the domains parallel to layer 1. This causes the domain walls to move and “favorable” domains to grow. The average magnetization current injected into layer 2 and its contribution to the s-d exchange energy are found by solving the continuity equation for carriers with spins pointing up and down. From the minimum condition for the total magnetic energy of the junction, the parameters of the periodic domain structure in layer 2 are determined as functions of current through the junction and magnetic field. It is shown that the spin-polarized current can magnetize layer 2 up to saturation even in the absence of an external magnetic field. The associated current densities are on the order of 105 A/cm2. In the presence of the field, its effect can be compensated by such a high current. Current-induced magnetization reversal in the layer is also possible.