Yes, it was allowed accordingly to the verse:
"They ask you about gambling or drinking, tell them there is a great sin in both although there is some benefit for men, the sin is greater than the benefit." (2:219)
But this was to encourage people to stop drinking.
Later it was declared Haraam in Surah al-Maidah. This was done as if it was instantly declared Haraam, people would have objected that the new religion is instantly trying to change all trends of the time.