The barrier potential in a p-n junction opposes the flow of:
**Diode characteristics** forward bias reduces barrier, width of depletion region decreases, resistance low ~10-100 Ω, current primarily due to majority diffusion, exponential I = I_s(e^{eV/kT}-1), reverse bias widens depletion region, resistance high ~MΩ, dominant current drift due to minority carriers, reverse saturation current small μA-nA, typically 10⁻⁶ A, increases sharply at breakdown Zener/avalanche. The barrier potential arises due to the space-charge region and opposes the diffusion of majority carriers (electrons from n-side to p-side and holes from p-side to n-side) at equilibrium.
Ref: NCERT > Physics Book > Electronic Devices > p-n Junction, Depletion Region and Diode Characteristics