greece market line
Greek officials said they expected to reach a bailout deal agreement with its creditors by August 18. In this photo, a man walks inside the Athens Stock Exchange in Greece on Aug 3, 2015. Reuters/Yiannis Kourtoglou

Greece said on Tuesday that it expects to have a finalized bailout deal with its international creditors by Aug. 18, ending months of uncertainty that have raised worries of a Greek default and its exit from the eurozone.

Government spokeswoman Olga Gerovasili said that the accord between Greece and its creditors would start being drafted on Wednesday. The Athens Stock Exchange rallied after the news, reaching a high of about 660 points from opening levels of 637. Tuesday’s rally came after a nosedive of 23 percent Monday, when the stock market reopened after a five-week hiatus.

"The first phase of negotiations ends today and the second phase starts, which really contains the details of drafting (the deal)," Gerovasili told Skai TV station, as cited by Reuters. "If the terms of the (EU) summit are met, I think that we will have a deal by the 18th of this month," she added.

Greece reached a deal with its creditors -- the International Monetary Fund (IMF), the European Central Bank (ECB) and the European Commission -- last month to receive a third round of critically needed bailout funds, which capped months of increasing acrimony between the various parties.

However, infighting in the ruling Syriza party has led to worries over the country’s financial future, after a revolt from within the leftist party over agreeing to the bailout and the economic reforms that creditors are demanding. Syriza originally came to power in January, promising to stand against austerity measures that they claimed were suffocating Greece’s economy.

In late July, the IMF said that it would not agree to a third Greek bailout, and IMF chief Christine Lagarde previously said that no further deals would be possible without substantial debt relief to Greece, a prospect that major creditor Germany has consistently shot down.

Greece and the other parties face a hard deadline of Aug. 20 for a deal that will provide Greece with desperately needed capital. The country’s economy went into a tailspin after the ECB capped its finances to Greece, forcing the nation's central bank to close.