Abstract. An analytical weakly nonlinear model of the Benjamin-Feir instability of a Stokes wave on nonuniform unidirectional current is presented. The model describes evolution of a Stokes wave and its two main sidebands propagating on a slowly varying steady current. In contrast to the models based on versions of the cubic Schrödinger equation, the current variations could be strong, which allows us to examine the blockage and consider substantial variations of the wave numbers and frequencies of interacting waves. The spatial scale of the current variation is assumed to have the same order as the spatial scale of the Benjamin-Feir (BF) instability. The model includes wave action conservation law and nonlinear dispersion relation for each of the wave's triad. The effect of nonuniform current, apart from linear transformation, is in the detuning of the resonant interactions, which strongly affects the nonlinear evolution of the system.The modulation instability of Stokes waves in nonuniform moving media has special properties. Interaction with countercurrent accelerates the growth of sideband modes on a short spatial scale. An increase in initial wave steepness intensifies the wave energy exchange accompanied by wave breaking dissipation, resulting in asymmetry of sideband modes and a frequency downshift with an energy transfer jump to the lower sideband mode, and depresses the higher sideband and carrier wave. Nonlinear waves may even overpass the blocking barrier produced by strong adverse current. The frequency downshift of the energy peak is permanent and the system does not revert to its initial state. We find reasonable correspondence between the results of model simulations and available experimental results for wave interaction with blocking opposing current. Large transient or freak waves with amplitude and steepness several times those of normal waves may form during temporal nonlinear focusing of the waves accompanied by energy income from sufficiently strong opposing current. We employ the model for the estimation of the maximum amplification of wave amplitudes as a function of opposing current value and compare the result obtained with recently published experimental results and modeling results obtained with the nonlinear Schrödinger equation.