The blue-chip FTSE 100 <.FTSE> index closed up 0.05 percent at 7,692.04 points while mid caps <.FTMC> rose 0.15 percent.

Politics were back in focus after two Eurosceptic British ministers quit on Monday in protest at May's Brexit plans.

The reaction in markets, however, has been relatively muted, with sterling giving up earlier gains after official data showed that Britain's economy picked up a bit of speed in May after a slowdown in early 2018, which in turn eased the pressure off the FTSE slightly.

"Our expectation is that the PM will survive this, and push ahead with her vision for Brexit," strategists and economists at UBS wealth management said.

"UK stocks have performed relatively well as their international exposure and high weighting to commodities has boosted earnings. We expect these trends to persist for some time yet," they added.

As Europe is about to step into the second-quarter earnings season, the focus is turning to company results.

Shares in Ocado had a volatile session and closed up 9 percent after a strong initial decline following the publication of the online supermarket's first-half earnings.

"The news of a £9 million loss over the first six months of 2018 did little to deter bullish investors seeking to take advantage of any short term share price weakness", wrote Josh Mahony, an analyst at IG.

Ocado's shares are up 177 percent so far in 2018.

"The general market view of the company remains at a buy, despite this stratospheric rise and regardless of some inevitable profit-taking as seen in early trade," Richard Hunter, head of markets at interactive investor, said.

TP ICAP was a heavy faller among the mid caps, down 36 percent, its worst day on record after the interdealer broker issued a profit warning and said that its CEO was stepping down.

(Reporting by Kit Rees; Editing by Alexandra Hudson and Peter Graff)

By Kit Rees