The FTSE 100 <.FTSE> rose 0.1 percent, and ended July 0.8 percent higher, outperforming European benchmarks which finished the month in the red.
The mid-cap index <.FTMC> was up 0.3 percent and made a monthly gain of 2.3 percent having ended June in the red - its worst month in a year.
HSBC (>> HSBC Holdings) shares pared gains to close 1.8 percent higher after Europe's biggest bank said profit grew 5 percent in the first half, and announced its third share buy-back in a year.
"Beyond this buyback therefore, HSBC has $13 billion in capital above management's 13 percent CET1 target - a focus on the investor call we think, despite the obvious uncertainties of Brexit, IFRS 9 and so on," UBS analysts said. They also said their estimates already assumed another $2 billion buy-back will be announced at third-quarter results.
Rival Standard Chartered (>> Standard Chartered), which reports results on Wednesday, also rose 2.2 percent. Both banks' gains helped the FTSE banking index <.FTNMX8350> stay close to a two-year high.
Cigarette makers Imperial Brands (>> Imperial Brands) and British American Tobacco (>> British American Tobacco) were still reeling from the U.S. Food and Drug Administration's announcement on Friday that it would cut nicotine in cigarettes to non-addictive levels.
Imperial fell 5.9 percent, the FTSE's worst-performing large-cap stock, while BAT dropped 5 percent, together taking nearly 30 points off the index. The companies have lost 9 and 10 percent of their market cap respectively over two sessions.
Analysts at Morgan Stanley said the new regulation looked "extremely ambitious, in many ways impractical." Deutsche Bank analysts said the dip in the shares could be a good buying opportunity.
A double upgrade from brokerage RBC boosted water utility Severn Trent (>> Severn Trent) to the top of the FTSE, up 4.1 percent.
"As [water regulator] Ofwat improves clarity on returns and costs benchmarks, we believe SVT's position at the cost frontier and its ability to achieve incentives will be revealed," RBC analysts said.
Rival United Utilities (>> United Utilities) also jumped 3 percent after RBC upgraded it.
"With low expectations more than priced in, UU has the biggest potential to surprise and represents the best value amongst its water peers," they said.
Miners underpinned recent gains as copper prices broke a two-year peak after strong manufacturing data from top commodity buyer China.
Engine maker Rolls Royce (>> Rolls-Royce) fell 4.4 percent on reports the company had told investors it might not hit its target of 1 billion pounds in cashflow by 2020.
A handful of mid-cap stocks led the STOXX 600.
Indivior (>> Indivior) rose 4 percent, hitting a fresh record high after the FDA accepted a drug for treatment of opioid use disorder.
Online financial trading company IG Group (>> IG Group Holdings) also gained 3.6 percent.
IT services firm FDM (>> FDM Group (Holdings) PLC) jumped 10.6 percent to a record high after reporting a 35.4 percent surge in first-half revenue.
Underwriter Hiscox (>> Hiscox Ltd), meanwhile, fell 4 percent after its first-half results disappointed.
(Reporting by Helen Reid; Editing by Raissa Kasolowsky and Jane Merriman)
By Helen Reid
Stocks treated in this article : BHP Billiton Plc
, British American Tobacco
, Standard Chartered
, Anglo American
, BHP Billiton Limited
, Rio Tinto Limited
, Severn Trent
, United Utilities
, Imperial Brands
, Rio Tinto
, KAZ Minerals PLC
, Ferrexpo Plc
, IG Group Holdings
, FDM Group (Holdings) PLC
, HSBC Holdings
, Hiscox Ltd