A debt write-off for Greece is out of the question, Portuguese Prime Minister Pedro Passos Coelho said on Friday.

"We can only give debt relief, we can't write it off under European rules. There was a compromise between all heads of state and government of the euro zone to discuss this problem as soon as Greece's first complete assessment of the new programme is made," Passos Coelho said at Lisbon's ISCTE university in Lisbon, Xinhua cited Portuguese Lusa news agency as saying in a report.

Passos Coelho pointed out that the alternative to forgiving part of Greece's debt would imply the country exiting the single currency.

"Greece could not be inside the euro zone and so that would be a help for the Greek to be able to redo their economy outside the euro zone, if they wished. In that case I have no doubt that it would be possible to forgive part of that debt," he pointed out.

Passos Coelho added that it was important for Greece to maintain a firm commitment to the structural reforms that have been delayed.

Portugal's prime minister has been telling voters before the general elections in October to look at Greece's crisis to convince them that austerity has been crucial to put the country's economy on track.

Portugal, which is considered the second weakest Eurozone economy after Greece, also has applied harsh austerity since signing a bailout in 2011 with international lenders, but complied strictly to the measures imposed. The Portuguese economy grew 0.9 percent last year.