Arguably, modern Britain was established as a state construct by the Acts of Union between the Scottish and English parliaments in 1707, though the Cornish, Welsh and Irish may disagree.
Before that the relationship between the British Isles and the Muslim world was minimal, though some trade had been established between England and the Muslim world over the centuries, but the relationship was highly fraught, thanks to the legacy of the Crusades,
Between 1609 and 1616, England lost 466 ships to the Muslim Barbary pirates, who were based in North Africa, and the passengers sold into slavery. During this period, regular raids by Muslim pirates on the British coastline, including Ireland, also contributed to the burgeoning white slave trade carried out by Muslim traders in the Mediterranean,
By the late nineteenth century, thanks to legitimate commercial trade and the growth of the British Empire, small numbers of Muslim seamen, mainly from the Middle East and India, had established themselves in various port towns, including Liverpool, Cardiff and South Shields, in the north east of England. However, due to race riots, particularly after the First World War, most Muslim seamen were rounded up and regularly deported by the authorities.
Early mosques had been established in Liverpool and Woking in the 1880s by eccentric white converts, to cater for Arab seaman and Indian students. And Muslim soldiers from India arrived in England to fight during the First World War, though all returned home following the end of the war in 1918. A similar, though much smaller, influx also occurred during the Second World War
The major influx of Muslim immigrants into the UK didn’t happen until the late forties and fifties, despite the end of British rule in most of the Muslim world. They now number somewhere between three and four million (including an estimated 100,000 ‘white’ converts) where they form 5%+ of the total population, concentrating themselves in the major towns and cities of England, where they have become significant minorities, approaching a rough majority in some districts.
They are divided by sect, ethnicity and nationality, occasionally hostile towards one another, but they are all united by their allegiance to the world caliphate as expressed by the word of Mohammed in the Koran bound by Sharia law which negates and is highly antagonistic to all man-made laws made by national parliaments or secular rulers.
Despite the stage managed bouts of flag-waving carried out by Muslim representatives and high profile converts, which are invariably met by huge guffaws by the native population, the position of the modern Muslim population in the UK is very precarious, mainly thanks to that antagonism exhibited by the totalitarian worldview of Islam. And as their numbers increase, such a world view could be expressed even more militantly than it is at present.
Only time will tell.