M&S shares rose 1.92%, taking the price to levels not seen since last June.
However, the FTSE 100 index ended 3.99 points off at 7,114.55.
There was little corporate news to move share prices, though Reckitt Benckiser closed down 0.9% after losing 1.7% earlier following its report of flat first quarter sales.
Major winners included Babcock International and Antofagasta. Fallers included Anglo American and Johnson Matthey.
A research note on M&S from Barclays gave the stock an "overweight" rating, adding that a shift towards food, and management's plan to overhaul its clothing and home segment, would drive growth.
"M&S cannot avoid industry headwinds but its older and wealthier customer base may be helpful," the analysts said. "We expect Food to account for 64% of UK sales in 2020, rising steadily from 52% in 2010."
The FTSE 100's Friday fall left the index down 2.9% for the week.
"The FTSE has obviously had a terrible week - although corporate earnings have been somewhat of a mixed bag. The snap election, while providing medium term stability for Brexit negotiations, has created some short term market uncertainty," said Mark Ward, head of execution trading at Sanlam Securities.
Mid-caps also fell slightly, but small-caps maintained their outperformance on the day. They have gained 7.1% and 5.9% respectively this year.
"People have been reaching for the UK domestic stocks, but there are reasons to be quite cautious there still," said Eric Moore, head of Miton's UK Income fund.
"The UK consumer is still under the cosh. Consumption has held up quite well but it's supported by things that are unsustainable in the long run," he added.
The pound was down 0.30% against the dollar at $1.2777. Against the euro the pound was down 0.13% at 1.1942 euros.
Marks and Spencer was one of the trading day's best performers after analysts at Barclays gave a thumbs-up to management's restructuring plans.