We develop an exploratory model for the outer, gravitationally unstable regions of accretion disks around massive black holes. We consider black holes of mass 10(6) to 10(10) M., and primeval or solar abundances. In a first step we study star formation and evolution in a purely gaseous marginally unstable disk, and we show that unstable fragments should collapse rapidly and give rise to compact objects (planets or protostars), which then accrete at a high rate and in less than 106 pears acquire a mass of a few tens of M., according to a mechanism first proposed by Artymowicz et al. (1993). When these stars explode as supernovae, the supernova shells break out of the disk, producing strong outflows. We show that the gaseous disk is able to support a large number of massive stars and supernovae while staying relatively homogeneous. An interesting aspect is that the residual neutron stars can undergo other accretion phases, leading to other (presumably powerful) supernova explosions. In a second step we assume that the regions at the periphery of the disk provide a quasi stationary mass inflow during the lifetime of quasars or of their progenitors, i.e. similar to 10(8) yrs, and that the whole mass transport is ensured by the supernovae, which induce a transfer of angular momentum towards the exterior, as shown by the numerical simulations of Rozyczka et al. (1995). Assuming that the star formation rate is proportional to the growth rate of the gravitational instability, we solve the disk structure and determine the gas and the stellar densities, the heating being provided mainly by the stars themselves. We find self-consistent solutions in which the gas is maintained in a state very close to gravitational instability, in a ring located between 0.1 and 10 pc for a black hole mass of 10(6)M., and between 1 and 100 pc for a black hole mass of 10(8)M. or larger, whatever the abundances, and for relatively low accretion rates (less than or equal to 10% of the critical accretion rate). For larger accretion rates the number of stars becomes so large that they inhibit any further star formation, and/or the rate of supernovae is so high that they distroy the homogeneity and the marginal stability of the disk. We postpone the study of this case. Several consequences of this model can be envisioned, besides the fact that it proposes a solution to the problem of the mass transport in the intermediate region of the disk when global instabilities do not work. As a first consequence, it could explain the high velocity metal enriched outflows implied by the presence of the broad absorption lines in quasars. As a second consequence it could account for a pregalactic enrichment of the intergalactic medium, if black holes formed early in the Universe. Finally it could provide a triggering mechanism for starbursts in the central regions of galaxies. A check of the model would be to detect a supernova exploding within a few parsecs from the center of an AGN, an observation which can be performed in the near future.