PHNOM PENH, Cambodia — An Australian filmmaker whose imprisonment in Cambodia on espionage charges made him a symbol of the government’s crackdown on journalists and opposition figures was pardoned on Friday, his lawyer said.

The filmmaker, James Ricketson, 69, had been jailed since June 2017, when he was arrested after filming a street rally held by the country’s most popular opposition party. After his arrest, the Cambodian police searched his computer and found emails to members of the opposition, seeking information and discussing the possibility of collaborating on a documentary.

Mr. Ricketson defended his actions as normal journalistic conduct, and vigorously denied that he was a spy. He was convicted last month and sentenced to six years in the Prey Sar prison; his family said he had suffered health problems on account of the unsanitary conditions there.

His arrest presaged a large-scale crackdown on dissent ordered by the authoritarian prime minister, Hun Sen. Beginning last summer, journalists were arrested and threatened, and a number of newspapers and radio stations were shut down. Ultimately, the opposition Cambodia National Rescue Party was dissolved by court order and its senior officials were barred from politics, just in time for a major election in July.