Brazil's president said at a press conference Thursday that he would complete his term in office even if found guilty of illegal campaign financing and vowed to put the nation's finances on a sound footing before handing over power.

Michel Temer said in reference to an electoral court investigation into his 2014 campaign that he would abide by any eventual definitive court ruling, though adding that initial rulings are subject to appeal and that the process would drag on until after his term ends in January 2019.

In 2014, Temer was the running mate of then-President Dilma Rousseff, who was re-elected that year. Temer subsequently became Rousseff's political enemy and reached the presidency when she was forced out of office a few months ago via impeachment for violating budget laws.

Former executives of Brazilian construction giant Odebrecht, in plea-deal testimony leaked to the press in recent weeks, have accused Temer of soliciting 10 million reais (around $3 million) to finance his Brazilian Democratic Movement Party's election campaigns in 2014.

The money - which, according to the leaked testimony, stems from corrupt activity - was allegedly paid in cash and in two parts.

Odebrecht is among a group of companies accused by Brazilian prosecutors of forming a cartel to overcharge state oil company Petrobras for contracts.

Much of the extra money went to corrupt Petrobras officials who approved the deals, while some of the loot was set aside to pay off politicians who provided cover for the graft.

The bribes-for-inflated contracts scandal forced Petrobras to write off some 6.2 billion reais (around $1.9 billion at the current exchange rate) in graft-related losses from the period between 2004 and 2014.

Temer said at Thursday's press conference that all ongoing investigations were essential for Brazil but added that they cannot impede his government's efforts to lift the country out of its current economic crisis.

He said his main objectives were to end Brazil's ongoing recession, reduce its large budget deficit and hand over a country with its economic house in order.

The president acknowledged that a constitutional amendment to limit public spending growth to the inflation rate for the next 20 years, a measure approved by Congress last week, had triggered a wave of nationwide protests.

But he said Brazilians would come to recognize that the spending ceiling was necessary to begin stabilizing the country's economy.