- In vivo and in vitro experimental studies have found that blocking electrical interactions connecting GABAergic interneurons reduces oscillatory activity in the gamma range in cortex. However, recent theoretical works have shown that the ability of electrical synapses to promote or impede synchrony, when alone, depends on their location on the dendritic tree of the neurons, the intrinsic properties of the neurons and the connectivity of the network. The goal of the present paper is to show that this versatility in the synchronizing ability of electrical synapses is greatly reduced when the neurons also interact via inhibition. To this end, we study a model network comprising two-compartment conductance-based neurons interacting with both types of synapses. We investigate the effect of electrical synapses on the dynamical state of the network as a function of the strength of the inhibition. We find that for weak inhibition, electrical synapses reinforce inhibition-generated synchrony only if they promote synchrony when they are alone. In contrast, when inhibition is sufficiently strong, electrical synapses improve synchrony even if when acting alone they would stabilize asynchronous firing. We clarify the mechanism underlying this cooperative interplay between electrical and inhibitory synapses. We show that it is relevant in two physiologically observed regimes: spike-to-spike synchrony, where neurons fire at almost every cycle of the population oscillations, and stochastic synchrony, where neurons fire irregularly and at a rate which is substantially lower than the frequency of the global population rhythm.