Ramon Fonseca, founding partner of law firm Mossack Fonseca, gestures as he talks to the media as he arrives at the Public Ministry office for the Odebrecht corruption case in Panama City, Panama February 9, 2017. REUTERS/Eduardo Grimaldo

PANAMA CITY (Reuters) - A Panamanian court has granted bail to the two founders of Mossack Fonseca, the law firm at the center of the Panama Papers scandal, in a case allegedly tied to a sprawling corruption scandal in Brazil.

Following their February arrest on charges of money laundering, Jurgen Mossack and Ramon Fonseca each paid $500,000 on Friday and will be set free later in the day, the attorney for the two lawyers, Guillermina McDonald, told Reuters.

McDonald said the court had ruled they two were not a flight risk since they had been cooperating with the investigation. Another lawyer from the firm, Edison Teano, was still being held, she said.

Mossack Fonseca emerged from obscurity in April 2016 with the Panama Papers, millions of documents stolen from the firm and leaked to the media that illustrated how the wealthy use offshore corporations to avoid taxes. Panama has not charged them in any matter related to the papers.

In the separate Brazil case, Mossack and Fonseca turned themselves in to authorities in February after Panamanian prosecutors said they had been linked to a sweeping three-year-old corruption investigation known as Operation Car Wash.