Hadithcore
Sahih al-Bukhari, 5579
sahih

Narrated Ibn `Umar:

"Alcoholic drinks were prohibited (by Allah) when there was nothing of it (special kind of wine) in Medina.

حَدَّثَنَا الْحَسَنُ بْنُ صَبَّاحٍ، حَدَّثَنَا مُحَمَّدُ بْنُ سَابِقٍ، حَدَّثَنَا مَالِكٌ ـ هُوَ ابْنُ مِغْوَلٍ ـ عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ ـ رضى الله عنهما ـ قَالَ لَقَدْ حُرِّمَتِ الْخَمْرُ، وَمَا بِالْمَدِينَةِ مِنْهَا شَىْءٌ‏.‏

References2 variants
In-Book Reference
Book 74, Hadith 5
USC-MSA web (English) reference
Vol. 7, Book 69, Hadith 485 (deprecated numbering scheme)