Brazil's President Dilma Rousseff said she will take legal action against a senator who accused her of being involved in corruption at state oil company Petrobras. The president ordered all due legal measures be taken against Senator Delcidio do Amaral, “to hold him responsible under the law for all his defamatory statements," her office reportedly said Saturday.

Amaral reportedly told a popular Brazilian magazine that the president knew of wrongdoings and tried to block investigations. Rousseff's successful presidential campaigns in 2010 and 2014 were financed with money from the scheme, he added. Amaral was a close ally of Rousseff and the leader of the ruling Workers' Party (PT) in the senate until his arrest in November on charges of attempting to bribe a former executive of Petrobras in exchange for his silence in the investigation.

Amaral also added that former president Luiz Inacio Lula da Silva masterminded the long-running Petrobras bribery scheme.

"Lula directly negotiated the appointment of Petrobras's directors with the different parties in Congress and knew exactly what the parties did with the directorships, mainly in terms of financing their campaigns," Amaral told Brazil’s Veja magazine, according to Deutsche Welle (DW), a German news agency.

A spokesman for Lula told DW that Amaral had no evidence to back what he told the magazine.

Rousseff’s attempts to appoint Lula as her chief of staff -- a position which comes with legal immunity -- have been blocked by a Supreme Court judge who said that Lula's appointment appeared to be so he could escape prosecution from lower courts where the Petrobras case was being heard.

Investigators have accused several Petrobras directors of colluding with contractors to overbill the company by billions of dollars, while bribing politicians to look the other way.

Thousands of Brazilians have taken to the streets to protest Lula’s appointment and demand Rousseff’s resignation in the past week. In capital Brasilia, riot police used pepper spray on more than 5,000 demonstrators who filled the streets outside the presidential palace and Congress building on Thursday.