The FTSE 100 index rose 1.1% as a rally in utilities, retailers, housebuilders and banking stocks offset the drag from sterling, which surged to a 19-month high against the U.S. dollar.
Housebuilders soared, with Taylor Wimpey, Berkeley and Persimmon all up about 14%, reaching record highs and topping the blue-chip index.
The FTSE 250 index, home to many companies with high UK exposures, surged as much as 5.2% to record highs, before easing slightly to end up 3.4%.
Trading volumes on the FTSE 100 index surged to nearly three times their daily average.
Stocks were benefiting from the Conservative victory and reports of a trade deal between China and the United States, said Emmanuel Cau, head of European equity strategy at Barclays.
"The banking sector, real estate, construction, utilities, all these sectors are expected to benefit from the 'feel-good' factor".
Johnson's victory lifted nationalisation fears hanging over utility stocks, boosting National Grid and United Utilities, which rose 4.5% and 6.7% respectively.
Opposition Labour leader Jeremy Corbyn had announced plans to nationalise utilities in his election manifesto.
Corbyn said on Friday he would step down as Labour leader. That decision is likely to be the biggest factor driving banks and utilities higher, by affirming nationalisation is now "off the table", said Citi analyst Andrew Coombs.
Among financials, RBS and Virgin Money stood out, rising 8.4% and 18.7%.
JPMorgan's basket of London-listed companies that make their cash in domestic markets rose 6.3% on Friday to record highs.
"I think there has been a huge 'underweight' on UK assets and we are seeing it unwind," said Kasper Elmgreen, head of equities at asset manager Amundi. "UK domestics are attractively priced and there is more way to go."
Graphic: UK election, https://fingfx.thomsonreuters.com/gfx/buzzifr/15/2834/2834/Pasted%20Image.jpg
(Reporting by Thyagaraju Adinarayan and Julien Ponthus; Additional reporting by Sruthi Shankar; Editing by Mike Harrison and Mark Potter)
By Thyagaraju Adinarayan and Julien Ponthus
Stocks treated in this article : FTSE 100 Index
, Taylor Wimpey
, Berkeley Group Holdings plc
, Barratt Developments PLC
, Barclays PLC
, Reckitt Benckiser Group plc
, United Utilities Group PLC
, The Royal Bank of Scotland Group plc
, National Grid plc