(For a Reuters live blog on U.S., UK and European stock markets, click or type LIVE/ in a news window)

* EZ factory activity remains in contraction - PMI

* Vivendi gains after Barclays upgrade

* AMS Osram jumps on bullish comments from Jefferies

Oct 2 (Reuters) - European stocks started the final quarter of the year with mild gains as the United States avoided a federal government shutdown, though data showed factory activity in the euro zone remained in a broad-based downturn.

The pan-European STOXX 600 index edged up 0.2% on Monday, with real estate and mining sectors leading morning gains.

Meanwhile, Wall Street futures climbed in relief after the U.S. Congress passed a stopgap funding bill late on Saturday, avoiding the federal government's fourth partial shutdown in a decade.

"With a U.S. government shutdown averted for now, it has brought a measure of relief," said Susannah Streeter, head of money and markets at Hargreaves Lansdown.

"Wall Street is expected to cling onto more positive vibes with the agreement reached in Washington. But the little dose of optimism after Friday's inflation data is set to fade away."

Meanwhile, euro zone manufacturing activity remained mired in a deep and broad-based downturn in September, according to a survey which showed that demand kept shrinking at a pace rarely surpassed since the data was first collected in 1997.

HCOB's final euro zone manufacturing Purchasing Managers' Index (PMI), compiled by S&P Global, dipped to 43.4 in September from August's 43.5, matching a preliminary estimate.

The benchmark STOXX 600 marked its first quarterly decline of the year on Friday, dented by concerns about a sputtering Chinese economy and interest rates staying elevated for longer.

Among single stocks, debt-burdened Casino slid 4.4% after the French retailer said it had completed the sale of a first set of 61 stores in France to Groupement Les Mousquetaires and extended its purchasing alliance to include private-label food products.

Vivendi rose 2.6% after Barclays upgraded the French media company to "overweight".

BAE Systems climbed 1.6% after Britain awarded the defence company a 4 billion pound ($4.89 billion) contract as part of the AUKUS programme with Australia and the U.S. to build attack submarines.

Swiss-listed sensor maker Ams Osram jumped 6.1% after Jefferies said that demand trends will "progressively improve" over the next two years even as it cut its price target on the stock. ($1 = 0.8187 pounds) (Reporting by Sruthi Shankar in Bengaluru; Editing by Rashmi Aich and Eileen Soreng)