Stephen Kim, a former U.S. Department of State contractor who admitted leaking classified information about North Korea’s military capabilities to a reporter, was sentenced Wednesday to 13 months in prison.

Federal prosecutors and Kim’s lawyers previously agreed to the sentence as part of a plea deal, but they continued to clash until the end over the seriousness of Kim’s actions and the government’s decision to prosecute him.