If I said that we went to an Oktoberfest last weekend, readers may wonder why I am writing about it. If I added that the beer festival in question was in the West Bank and there we encountered a couple of self-deprecating young Germans dressed in lederhosen, some may start asking themselves what I've been drinking, or perhaps smoking.

To add to the bizarreness of the situation, this Oktoberfest, the seventh of its kind, took place not in hip Ramallah but in the remote village of Taybeh, perched picturesquely at 850m above sea level and with a population of just 1,500. Moreover, readers in western countries may wonder why thousands upon thousands of revellers had trekked all that way to attend a beer festival with only one beer on tap.

Secular Palestinians, expats and even leftist Israelis equipped with glasses of Taybeh beer wandered around food and handicraft stands, watched traditional Dabke dancers, modern music, comedy and theatrical performances.

Despite its remoteness and tiny proportions, Taybeh has earned its place on the cultural and social map as being the location of the only Palestinian beer brewery. It has battled the restrictions imposed by the Israeli occupation and the rise of Islamic fundamentalism to become a rare Palestinian business and cultural success story.

This may explain why Taybeh once adopted "Taste the revolution" as its advertising slogan. And, judging by its micro-brewery quality, the revolution tastes pretty good.

The very existence of Taybeh overturns the stereotype associated with Palestinians – and Arabs in general – as teetotal, fanatical Muslims. This caricature has been reinforced since Hamas's takeover of Gaza, where the Islamist party has imposed a de facto ban on alcohol, though bootlegging has become a popular, if risky, pastime.

There are those who will protest that Taybeh is the exception that proves the rule. After all, it is the only Palestinian brewery, and it is owned and run by Christians. But the absence of local competitors has more to do with the difficulty of setting up a viable business in the Palestinian territories, which requires a certain foolhardiness and courage – and, anyway, most of the people who drink Taybeh are Muslims.

In the wider Arab and Muslim context, booze is widely available. Although alcohol is generally considered to be haraam (forbidden) in Islam, only the most conservative countries actually impose a legal ban on it. Egypt, for instance, has a booming local alcohol industry that has been growing for years.

This is not just a recent "innovation", as conservative Muslims might believe. The prominent 19th-century orientalist Edward William Lane – famous for his incredibly observant if somewhat condescending book, Manners and Customs of the Modern Egyptians – provides, in one of his lesser-known works, some fascinating details about the drinking habits of Egyptians.

"From the conversations and writings of Arabs," he notes, "drinking wine in private and by select parties is far from being uncommon among modern Muslims." Lane also alludes to the fact that boozing was even more common in earlier centuries, before the introduction of tobacco and coffee as substitutes.

There is plenty of historical evidence to back Lane's assertion. Numerous prominent Muslims throughout the ages drank alcohol. Even caliphs, such as the Abbasid ruler Haroun al-Rashid of One Thousand and One Nights fame, were reputed to indulge, despite their title of "commanders of the faithful".

Pre-Islamic Arabic poetry is famous for its odes to wine, known as khamariyat, and this tradition continued into the Islamic era. Take Abu Nuwas, Haroun al-Rashid's camp court poet. In addition to his homoerotic ghazal, he penned endless verse in praise of wine.

Although he was considered to be the greatest Arab poet ever during his lifetime, Nuwas has fallen out of favour with the modern Muslim reader. But he is not alone in talking up the virtues of drink. The celebrated poet and polymath Omar Khayyám wrote extensively about wine and love, as did the legendary Sufi mystic Rumi.

Modern-day puritans will argue that Khayyám and Rumi used wine and drunkenness as a metaphor for spiritual intoxication. But there's no reason why their poetry should not be read both literally and figuratively, as mystics have long used alcohol (after all, we do use the term "spirit" to describe some drinks) and other drugs to alter their consciousness in pursuit of the divine.

The relatively relaxed attitude to alcohol in the earlier centuries of Islam may have been due to doubts, in the days before the religion had hardened into rigid orthodoxy, as to whether the Qur'an actually prohibits the consumption of alcohol or merely recommends moderation and/or abstinence. Some hadith (traditions of the prophet) even suggest that Muhammad may have actually drunk mildly alcoholic beverages.

Regardless of whether this is the case or not, devout Muslims have every right to consider alcohol haraam and not part of Islam the religion. But they must also accept that alcohol has always been an integral and largely tolerated aspect of Islamic culture.