BANGOR, Maine — A University of Maine graduate now working as a journalist for the international Associated Press news agency was deported from South Sudan on Tuesday allegedly because his reporting was critical of the government, Reuters reported on Wednesday.

Journalists in South Sudan have often complained of harassment by the authorities during the civil conflict there. In 2015, five journalists were killed in South Sudan, according to the Committee to Protect Journalists.

Justin Lynch was working for The Associated Press when he was ordered to leave South Sudan and put on a plane to Uganda, according to the Associated Press.

“Yesterday I was arrested and deported by members of South Sudan’s National Security Service. The officers did not officially present me with a reason for my arrest and deportation, but repeatedly said that my reporting was too critical of the government. This is a violation of press freedom,” Lynch, 25, said in a note on his Twitter account.

“As an international journalist, it is an unfortunate reality that I am privileged compared to my brave South Sudanese colleagues, who are frequently the victim of intimidation or even death,” he wrote.

Originally from Saratoga, New York, Lynch graduated from UMaine in 2013 with degrees in economics, political science and legal studies, according to his profile on LinkedIn.

While there, he was president of the university’s International Affairs Association, was a communications and policy intern for U.S. Sen. Angus King and participated in track and field. He also worked in sales and marketing and as an events multimedia consultant for the Bangor Daily News from February to November 2013.

“The University of Maine has a proud tradition of graduating talented, dedicated reporters, so it comes as no surprise to Senator King that this young man earned his degree and committed his many talents to reporting human rights abuses,” King’s spokesman Scott Ogden said Wednesday in an email.

“He is certain that this is not the last time we hear from Justin,” Ogden said.

South Sudan, which won independence in 2011, plunged into civil conflict in December 2013 after a long running political feud between President Salva Kiir and his former deputy, Riek Machar, who are from different ethnic groups. Much of the fighting ran along ethnic lines, according to Reuters.

A peace deal was signed in 2015 but proved shaky from the outset. Weeks after Machar flew back to Juba this year to return to his former post, fighting again erupted in July. Machar has since left the country and been replaced.

In November, security officials temporarily shut down Eye Radio in Juba, a popular radio station set up with U.S. backing, without giving a reason.

In September, the authorities shut the Nation Mirror newspaper without giving a reason, although it followed coverage of a report by a U.S.-based group alleging misuse of state funds by the nation’s leaders. It remains closed.

In July, authorities detained a newspaper editor for writing articles that criticized the country’s leaders over a flare-up in violence that month.

Another newspaper, the Juba Monitor, has been closed temporarily on several occasions.

Last week, a senior official at the U.N. commission on human rights said that ethnic cleansing was taking place in some areas of South Sudan and the stage was set for a repeat of a genocide like the one that happened in Rwanda.

Reuters contributed to this report.