Overseas owners sold eight UK companies in deals worth a combined £6.9bn over the first quarter of this year - the highest value on record. Yet overseas buyers continued to push money into the UK during the first quarter of this year, as they acquired UK businesses in 75 transactions worth £21.7bn.This was up a massive £18.2bn from the fourth quarter of last year, according to the data from the Office for National Statistics (ONS) which has been collected since 1987.Read more: Global deal value passes $2 trillion as M&A boom continuesThe hefty rise in value was mainly due to a few mega-deals completing in the quarter, including Vantiv's £8bn approach for Worldpay and GVC's £4bn acquisition of Ladbrokes.One City corporate finance adviser told City A.M.: "In the face of speculation surrounding the political uncertainty of Brexit, UK M&A has remained incredibly robust.These latest findings demonstrate yet again that the UK is a very attractive destination for foreign investment.Today's rise was also helped by the fact that the fourth quarter of last year was comparatively quiet compared to other recent periods, in terms of M&A deal value.Though overseas companies showed no sign of reducing their scrutiny on the UK market, domestic firms did seem less interested in looking beyond the country's borders.The value of outbound deals, where UK companies sought foreign targets, sank to £1.7bn - the lowest level since the second quarter of 2016, when firms were preparing for the imminent Brexit referendum.Read more: There's more to come in the M&A boomThere were still a few notable deals, such as engineering company IMI's £148m play for the US's Bimba and TDR Capital gobbling up France's Buffalo Grill for around £350m.UK companies were not totally despondent, however, as entirely domestic M&A climbed slightly on the previous quarter to £5.9bn. The number of deals increased as well as their value, to 88.Tesco's Booker deal helped to lift the total value, as did Montagu Private Equity's play for tech firm Servelec.Read more: Global telco M&A hits 12-year high following T-Mobile deal with Sprint