The FBI have released 100 pages of heavily censored documents related to its agreement with an unidentified vendor to hack into an iPhone used by one of the attackers involved in the San Bernardino shootings.

The records were provided in response to a federal lawsuit filed against the FBI by The Associated Press, Vice Media and the parent company of USA Today.

In September the media organisations sued to learn how much the FBI paid and who it hired to break into the phone of Syed Rizwan Farook, who along with his wife killed 14 people at a holiday gathering of disability centre workers in December 2015.

However the newly released records did not identify whom the FBI paid to perform the work or how much it cost.

The FBI for weeks had maintained that only Apple could access the information on its phone, which was protected by encryption, but ultimately broke or bypassed Apple's digital locks with the help of an unnamed third party.

The FBI, in its records release on Friday, censored critical details that would have shown how much the FBI paid, whom it hired and how it opened the phone.

The files had been marked "secret" before they were turned over under the lawsuit.

Lawsuit argues public has right to know if vendor is secure

The files make clear that the FBI signed a nondisclosure agreement with the vendor.

The records also show that the FBI received three inquiries from companies interested in developing a product to unlock the phone, but none had the ability to come up with a solution fast enough for the FBI.

The FBI also said in contracting documents that it did not solicit competing bids or proposals because it thought widely disclosing the bureau's needs could harm national security.

The lawsuit was filed months after the FBI's sudden announcement in March that it had purchased a tool from an unidentified third party to open Farook's phone.

The disclosure aborted a court fight that began when a federal judge had directed Apple to help the FBI break into the phone.

The suit by the media organisations argued there was no legal basis to withhold the information and challenged the adequacy of the FBI's search for relevant records. It also said the public had a right to know whether the vendor has adequate security measures, is a proper recipient of government funds and will act only in the public interest.

In refusing to provide the records, the FBI said the records had been compiled for law enforcement purposes and might interfere with ongoing enforcement proceedings, even though at the time the shooters were both dead and there were no indications others were involved.