The objective of the raid Tuesday in Panama City was to look for documents "related to news reports establishing the possible use of the firm for illegal activities," the attorney general's office said.
The so-called Panama Papers scandal has implicated several world leaders, and exposed the dark world of offshore companies.
The raid that started Tuesday evening had stretched for more than 18 hours into Wednesday in what Attorney General Kenia Porcell described as a "very complicated investigation."
Authorities are "searching for information, documents, collecting evidence that could prove the commission of punishable crimes," Porcell told reporters.
The attorney general said her office would work with authorities from other countries who are investigating after the document leaks.
"We will provide all the collaboration required to clarify what happened and determine whether or not there was a crime committed," she said. "This will contribute to cleaning up the image of our country."
Mossack Fonseca said it was cooperating with authorities in the investigation at its headquarters -- and that it wasn't the perpetrator of any crime, but the victim.
"We have a long history of working proactively with relevant authorities in various jurisdictions when questions are raised and additional information is required, and in many cases we're the ones who actually initiate that contact when suspicious activities are detected," Mossack Fonseca said.
"In this case, we're the ones against whom a crime has been committed. Our systems having been unlawfully breached by parties external to the firm. As we've always done over nearly 40 years of doing business, we stand ready, willing and eager to cooperate with authorities again on their latest investigations to ensure this situation is brought to a just conclusion."
This week, authorities in Peru also raided
the law firm's offices in Lima.
The Panama Papers
refers to what may be the largest leak of documents in history -- a total of 11 million emails, documents and client records. The information in the papers seems to indicate that Mossack Fonseca may have helped people around the globe set up shell companies and offshore accounts.
The documents implicate scores of world leaders, politicians and celebrities.
Ramon Fonseca, a co-founder of the firm, has said the information published about the company was false. In a statement, the firm said it had done nothing wrong and the reports would create confusion about offshore finance.
Panama's Office of the Attorney General and its Organized Crime Division, the Institute of Digital Forensics, the Judicial Investigation Bureau and the National Police all took part in the raid.