Greek Prime Minister Alexis Tsipras announced early on Saturday that his government would hold a referendum on July 5 on the country's bailout deal with foreign creditors.

Tsipras made the surprise referendum announcement in a televised address to the nation after midnight in Athens, reported Independent.

"After five months of tough negotiations, our partners unfortunately resorted to a proposal-ultimatum to the Greek people. I call on the Greek people to rule on the blackmailing ultimatum asking us to accept a strict and humiliating austerity without end and without prospect," Tsipras said, according to ekathimerini.

Tsipras said his government is against accepting the proposals put forward by foreign creditors.The foreign creditors include the "hated troika" - the European Commission, the European Central Bank and the International Monetary Fund. The Greek prime minister, however, made it clear that he would accept the result of the referendum.

"These proposals, which clearly violate the European rules and the basic rights to work, equality and dignity show that the purpose of some of the partners and institutions was not a viable agreement for all parties, but possibly the humiliation of an entire people," Tsipras said, according to BBC.

Greece needs to make repayment of a $1.73 billion of loans to the International Monetary Fund (IMF) on Tuesday, June 30 but it seems unlikely now due to the surprise announcement, according to the Wall Street Journal.

Greek opposition parties attacked the government's decision to hold a referendum, reported Reuters. "Mr. Tsipras today leads the country to a referendum with a the ultimate question being a 'yes' or 'no' to Europe and he proposes a rift with all our partners and an exit from the euro," said former Prime Minister Antonis Samaras.