The United States pledged $12 million to help improve Panama's justice system in an agreement signed by the two governments Friday.

The funds are earmarked to allow the judicial branch and the prosecutor's office to provide on-the-job training, computerize legal records and build a basic law library, the U.S. Embassy said in a news release."Both Panama and the United States recognize that the current justice system in Panama is the legacy of negligence, bad management and distortion by the military regime," the release said.