  We construct modified cosmological scenarios through the application of the
first law of thermodynamics in the universe horizon, but using the generalized,
nonextensive Tsallis entropy instead of the usual Bekenstein-Hawking one. We
result to modified cosmological equations that possess the usual ones as a
particular limit, but which in the general case contain extra terms that appear
for the first time, that constitute an effective dark energy sector quantified
by the nonextensive parameter $\delta$. When the matter sector is dust, we
extract analytical expressions for the dark energy density and
equation-of-state parameters, and we extend these solutions to the case where
radiation is present too. We show that the universe exhibits the usual thermal
history, with the sequence of matter and dark-energy eras, and according to the
value of $\delta$ the dark-energy equation-of-state parameter can be
quintessence-like, phantom-like, or experience the phantom-divide crossing
during the evolution. Even in the case where the explicit cosmological constant
is absent, the scenario at hand can very efficiently mimic $\Lambda$CDM
cosmology, and is in excellent agreement with Supernovae type Ia observational
data.
