Former Haaretz reporter Uri Blau signed a plea bargain with the state on Thursday, pleading guilty to possession of some 1,800 secret military documents leaked to him by then-IDF soldier Anat Kamm. He now faces up to four months in prison.

Blau, who had worked as a reporter for Haaretz, agreed to plead guilty of possessing the papers but stressed that he had no intention of harming the state.

The prosecution noted that the content of the material that Blau held had the potential to cause “enormous” damage to the state or endanger the lives of soldiers, had it fallen into enemy hands.

In a press release, the prosecution said Blau admitted he had received a USB flash drive with 1,800 military documents, many of them classified as “secret” and “top secret.” The device was given to the former reporter by Anat Kamm, who had stolen them during her service and is now in jail convicted of espionage charges.

The documents included detailed maps and numbers of the IDF’s emergency and wartime plans, as well as orders and protocols of routine operations.

According to a Justice Ministry press release, Blau faces up to four months in prison, but a judge could commute his sentence to community service instead.

In a statement at the end of May the prosecution explained why it did not push for harsher espionage-related charges, citing considerations of freedom of the press.

Almagor, an right-wing organization that helps victims of terror attacks and their families, wrote a letter to the attorney general asking him to stop the deal.

Meir Indor, Almagor’s CEO, wrote in a statement that the agreement proved that with the right friends, one could get away with anything. “With this plea bargain, the State Attorney’s Office is saying: Feel free to steal, publish, and trade in the secrets of the State of Israel. If you are a member of the right club, you’ll get a good deal.”

During her army service in 2006, Kamm served as an assistant in the office of the then commander of Israel’s Central Command, Major General Yair Naveh. Kamm copied thousands of classified documents from his office and then passed them on to Blau after she had left the IDF.

In 2008 Blau published details from the documents in a series of articles about the IDF’s practice of targeted killings that led investigators to Kamm’s door, and in 2010 she was arrested for espionage. In February 2011 Kamm entered into a plea bargain and pleaded guilty to leaking state secrets in return for not being charged with damaging national security. In October 2011 she was sentenced to four and a half years in prison and 18 months’ probation.

Haaretz publisher Amos Shocken told Walla News that the prosecution’s decision to file an indictment was unfortunate and could lead to a chilling effect on a reporter’s ability to cover the defense system. He added, however, that he respected Blau’s decision to settle.