Story highlights Michel Temer took over when President Dilma Rousseff was impeached

Temer has denied paying bribes

Rio de Janeiro (CNN) Brazil's top electoral court voted to acquit President Michel Temer and former President Dilma Rousseff following an investigation of allegations they received illegal campaign funds in the 2014 elections.

The 4-3 decision gives Temer some breathing room, but he still faces a corruption investigation and street protests that threaten to force him from office before the next presidential elections in October 2018.

Temer, 76, was the vice-presidential candidate alongside Rousseff in 2014, but Rousseff was impeached last year for illegal fiscal maneuvers aimed at hiding the budget shortfall. She has denied the allegations.

The prospect of a second Brazilian president being forced out of office in less than a year has unsettled markets and investors.

The Brazilian economy has started to crawl out of the worst recession on record, thanks in part to Temer's efforts to push unpopular austerity measures through Congress.

Read More