  We study the possibility of quasar outflows in clusters and groups of
galaxies heating the intracluster gas in order to explain the recent
observation of excess entropy in this gas. We use the extended Press-Schechter
formalism to estimate the number of quasars that become members of a group of
cluster of a given mass and formation epoch. We also estimate the fraction of
mechanical energy in the outflows that is imparted to the surrounding medium as
a function of the density and temperature of this gas. We finally calculate the
total amount of non-gravitational heating from such outflows as a function of
the cluster potential and formation epoch. We show that outflows from broad
absorption line (BAL) and radio loud quasars can provide the required amount of
heating of the intracluster gas. We find that in this scenario most of the
heating takes place at $z \sim 1\hbox{--}4$, and that this ``preheating'' epoch
is at lower redshift for lower mass clusters.
