  We analyze the existence, bifurcations, and shape transformations of
one-dimensional gap solitons (GSs) in the first finite bandgap induced by a
periodic potential built into materials with local self-focusing and nonlocal
self-defocusing nonlinearities. Originally stable on-site GS modes become
unstable near the upper edge of the bandgap with the introduction of the
nonlocal self-defocusing nonlinearity with a small nonlocality radius. Unstable
off-site GSs bifurcate into a new branch featuring single-humped,
double-humped, and flat-top modes due to the competition between local and
nonlocal nonlinearities. The mechanism underlying the complex bifurcation
pattern and cutoff effects (termination of some bifurcation branches) is
illustrated in terms of the shape transformation under the action of the
varying degree of the nonlocality. The results of this work suggest a
possibility of optical-signal processing by means of the competing nonlocal and
local nonlinearities.
