According to legend, the Or Hachaim cursed the Karaites, because they tricked him into walking on a Mishneh Torah, that they would never be able to muster a minyan.
This apparently did happen in Turkey at the time - any time a Karaite would gain a new member, an old one would die.
Apparently the British Consul in Mandate Palestine James Finn wrote, when in 1852 twenty Karaite immigrantes arrived in Jerusalem and became deathly ill and quickly passed away, that "it was a judgement from Heaven on the Karaites that they were never able to muster a prayer quorum".
I've seen this mentioned in A Legacy of Leaders (The Bayar Edition by Yehuda Azoulay), as well as here (p. 16):
In 1741, the mayor of the Jerusalem demanded that the Jews pay an inordinately high tax. An urgent meeting was organised by the resident rabbonim. Since the Karaite shul was literally underground, it was felt it would be the most unobtrusive place to hold the meeting. The story is told that as Rav Chaim ben Atar (the Ohr Hachayim) walked down the steps, he slipped and fainted. The Rabbis laid him on the floor and tried to revive him and meanwhile the stone stair.
Where he had slipped was dislodged, revealing that underneath it, there had been placed a volume of the Rambam’s Mishnah Torah. When the Ohr Hachayim regained consciousness, he denounced the Karaites for their flagrant disrespect, and decreed that they would be responsible for the full tax demanded by the mayor. Furthermore, he cursed them that they would never have a tenth man to make a minyan.
Although certain elements of the story are undoubtedly correct (the British consul, James Finn, recorded a century later - in 1853 - that “it was a judgement from Heaven on the Karaites that they were never able to muster a prayer quorum”), the imposing of the full tax on the Karaites would have been extremely unlikely given that their entire community consisted of a handful of indigent individuals and there was no expectation that it was going to grow. Another fascinating tale of Karaite and Rabbinic Jews in Jerusalem emerges from a quite detailed letter discovered in the Cairo genizoh. In 1053, a group of Jews left Toledo in Spain, headed for the Holy Land. One of these couples - Ibrahim ibn Fadanj and his wife - had originally been part of the Rabbinite community and descendants of a distinguished family, but had switched over to Karaism before their arrival in Eretz Yisroel. Indeed, it is probable that this change had brought them to Jerusalem in the first place, given that Jerusalem was a stronghold of Karaite Judaism in the 11th century.
Having settled in Ramleh, an issue arose which would threaten their marriage. As Ibn Fadanj’s brother was married to his wife’s sister, they were forbidden by Karaite law to remain married, since Karaites maintained that marriage made husband and wife into one literal unit, thereby forbidding all their immediate relatives to one another. Ibn Fadanj and his wife then moved to Jerusalem with their four children and joined the Karaite community, but after two years the Karaite elders discovered the matter of their forbidden marriage and ordered them to divorce. At this point they decided to re-join the Rabbinite community, in order to preserve their marriage
I am looking to substantiate this original story, this curse, this quote from James Finn, and if there is any evidence of this curse today. The latter seems unlikely (although there may be discussion as to why the curse has been lifted which will also be on topic!), so I am mainly hoping for the exact source of the quote from James Finn, and the original mention of the episode with the Ohr Hachaim Hakodesh.