Prime Minister Alexis Tsipras, who was gambling the future of his 5-month-old left-wing government on the vote, insisted that a "no" vote would strengthen his hand to negotiate a better deal with creditors, while a "yes" result would mean capitulating to their harsh demands.
The opposition has accused Tsipras of jeopardising the country's membership in the 19-nation club that uses the euro and said a "yes" vote was about keeping the common currency.
The vote was held amid banking restrictions imposed last Monday to halt a bank run, with Greeks queueing up at ATMs across the country to withdraw a maximum 60 euros per day.
Banks have been shut all week, and it is uncertain when they will reopen.
More From This Section
Governing left-wing Syriza party Eurodeputy Dimitris Papadimoulis said that "Greek people are proving they want to remain in Europe" as equal members "and not as a debt colony." The referendum was Greece's first in 41 years.
Minister of State Nikos Papas, speaking on Alpha television, said it would be "wrong to link a 'no' result to an exit from the eurozone. If a 'no' prevails that will help us get a better agreement."
Tsipras' high-stakes brinkmanship with lenders from the eurozone countries and the International Monetary Fund resulted in Greece defaulting on its debts this week and shutting down its banks to avoid their collapse. He called the referendum last weekend, giving both sides just a week to campaign.
European officials have openly urged Greeks to vote against the government's recommendation.
"I hope people say 'yes,'" European Parliament President Martin Schulz told German public radio. "If after the referendum, the majority is a 'no,' they will have to introduce another currency because the euro will no longer be available for a means of payment."
As voters flocked to polling stations, large lines once again formed at ATMs.