"There will be peace," Indonesian Justice and Human Rights Minister Hamid Awaluddin said on Sunday at the end of a fifth round of negotiations between the government and the Free Aceh Movement (GAM).
A memorandum of understanding will be formally signed next month.
The agreement is to bring a "peaceful, comprehensive and sustainable solution" to end a conflict that has raged in the province since 1976 and cost nearly 15,000 lives.
Both sides agreed that "no substantive changes" would be introduced to the eight-page long initialled memorandum before it is signed on 15 August in Finland.
"We may add a comma or correct a spelling mistake," peace talks mediator Martti Ahtisaari told reporters, refusing however to reveal any of the details of the accord.
He merely said that the agreement covered the governing of Aceh, including political participation, as well as questions of human rights, amnesty and reintegration into society, security arrangements, and dispute settlement.
He also called for an immediate end to ongoing bloodshed in the province.
The three-decade old conflict
has killed nearly 15,000 people
"Of course all hostilities have to end with the signing of the memorandum of understanding on the 15th of August," he said.
Both sides also agreed to establish an Aceh monitoring mission to check on progress which they hope will be run by the European Union and a number of Asian countries.
The ongoing round of talks, which began on Tuesday and which is the fifth held in the Finnish capital this year, had been considered a last chance to bring an end to the bloodshed soon.
The talks resembled a rollercoaster-ride of alternately good and disastrous progress reports throughout the week and success was only ensured when the thorny issue of local political participation in Aceh had been resolved on Saturday.
GAM had demanded the right to create local political parties that are not controlled centrally from the capital, something that is illegal in Indonesia.
GAM spokesman Bakhtiar Abdullah confirmed before the talks finished that Jakarta had said it would permit the creation of local political parties in the province for a trial period of one year, but Ahtisaari on Sunday declined to confirm whether this was indeed the plan.
"The idea was that ... there should be a chance for anybody to be able to participate in the political process," he said.
GAM gave up its demand for full independence and said it would disarm, while the government announced it would withdraw its troops from the province once the rebels hand in their weapons.