(Adds details of accusations from plea testimony, no comment from education minister)
By Maria Carolina Marcello
BRASILIA, March 15 (Reuters) - Brazil's Supreme Court said on Tuesday it had accepted a plea agreement offered by prosecutors to Senator Delcídio do Amaral, a legislative ally of President Dilma Rousseff until he was arrested last year in a far-reaching corruption scandal.
A copy of Amaral's testimony for the plea, obtained by Reuters, confirmed leaks to Brazilian media in recent weeks that the senator told prosecutors that both Rousseff and former president Luiz Inácio Lula da Silva had been aware of corruption at state-run energy company Petroleo Brasileiro SA.
Both Rousseff and Lula have denied any wrongdoing.
The allegations in the plea underscore the reach of a scandal that has ensnared dozens of top political and corporate leaders in Latin America's biggest country, and now threatens to topple Rousseff's administration, which is struggling with an economic recession and impeachment proceedings in Congress.
The charges, among many detailed for the plea in Amaral's four days of testimony in February, have not been proven and must still be heard by the court. Because the case involves senior elected leaders, by law it must go before the country's highest judges.
Neither Amaral nor his attorney were immediately available for comment.
Amaral, according to the testimony, told prosecutors that Rousseff tried to intervene to get prosecutors to release defendants they had jailed in the scandal.
He also told prosecutors that Aloísio Mercadante, a Workers' Party veteran who has served as Rousseff's chief-of-staff and is now education minister, last year offered to pay Amaral to keep quiet in the investigation.
A spokesman at Brazil's Education Ministry declined to comment on the allegations regarding Mercadante.
The allegations are likely to fuel further uproar in Brazil, where the scandal has overshadowed other major problems, including the recession and the ongoing scare over the Zika virus outbreak.
More than a million people marched in demonstrations across Brazil on Sunday, calling for Rousseff's ouster and in a show of support for the investigations, triggered by evidence of kickbacks by contractors to executives and political leaders in exchange for work with Petrobras, as the oil company is known.
Amaral was arrested in November by prosecutors citing evidence that he had tried to bribe a former Petrobras executive in exchange for his silence in the investigation. The court released Amaral from custody last month, shortly before news of a plea deal was reported. (Additional reporting by Lisandra Paraguassu in Brasilia; Writing by Paulo Prada; Editing by W Simon and Alan Crosby)