By Rabbi Chaim Chazzan
According to Torah, a man may marry a close relative such as a niece or a first cousin. In recent generations it has been proven medically, that marrying such a relative poses a significantly higher risk of having children born with genetic diseases (such as blindness r”l). Would such a marriage now be forbidden due to the health risks to the children?
The Gemara actually considers it a mitzvah to marry a relative, especially the daughter of one’s sister. The Rishonim explain the advantage that it will result in a better marriage, and that he is helping his own family.
Since this Gemara is brought as a halacha in Shulchan Aruch, it would be impossible to forbid something which is explicitly permitted in Shulchan Aruch. One may, however, suggest refraining from such a marriage due to the risks to the children involved.
In the tzava’ah (ethical will) of Reb Yehuda Hachosid he cautions against marrying a niece. Many question how he could forbid something considered a virtue in the Gemara? There are those who explain that indeed both the Gemara and Reb Yehuda Hachosid were aware of dangers inherent in such a marriage, but the Gemara marshaled the principle שומר מצוה לא ידע דבר רע – one who engages in a mitzvah that has a minimal risk attached (where the element of danger is not common), the mitzvah will guard him from harm. The Gemara regarded the risk minimal enough for the mitzvah to save one’s children from danger. However Reb Yehuda Hachosid realized that in his day people were marrying their relatives not purely for the sake of the mitzvah, and thereby forfeiting the safeguard afforded by the mitzvah, hence he warned against it.
It should be noted that there are several published answers from the Rebbe in which he consents to marriages between relatives, provided they are healthy.
 יבמות ס”ג ע”א, סנהדרין ע”ו ע”ב
 רש”י ותוס’ שם, מאירי ליבמות שם, רמב”ם פ”ב מהל’ אסו”ב ה”ד ומגיד משנה שם
 אה”ע סי’ ב סעי’ ו
 ציץ אליעזר חט”ו סי’ מד, אבל ראה שו”ת דברי יציב חלק אבה”ע סי’ ח
 שו”ת אבן הראשה לר”א קלאצקין סי’ לא; ספר אפי זוטרי על שו”ע אבן העזר שם (להר”י פארדו בנו של בעל החסדי דוד על התוספתא); וע”ע בשו”ת דברי חיים ח”א אבה”ע סי’ ח; שו”ת שם אריה חיו”ד סי’ כז
 שערי הלכה ומנהג אבה”ז עמ’ עז