The then-Tufts University graduate student detained by federal immigration authorities for co-writing an opinion piece related to Palestine has returned to Turkey and says she has reached a settlement with the government over longstanding legal issues.

“After 13 years of dedicated study, I am very proud to have completed my Ph.D. and to return home on my own timeline,” said Rümeysa Öztürk. “The time stolen from me by the U.S. government belongs not just to me, but to the children and youth I have dedicated my life to advocating for.”

Öztürk was detained by U.S. Immigration and Customs Enforcement last year near her home in Somerville, and was detained for more than six weeks in a Louisiana detention center. She was released by a federal judge.

An immigration judge terminated the removal proceedings against Öztürk earlier this year, finding that the government had no basis to deport her. The government appealed that decision soon after to the Board of Immigration Appeals.

This week, under the terms of the settlement agreement, the government and Öztürk jointly requested termination of proceedings in front of the Board, according to Öztürk.

The U.S. Department of Homeland Security did not immediately respond to a request for comment on the settlement.

“With them in mind, I am choosing to return home as planned to continue my career as a woman scholar without losing more time to the state-imposed violence and hostility I have experienced in the United States — all for nothing more than co-signing an op-ed advocating for Palestinian rights,” she wrote in a statement.

Öztürk was detained for co-authoring an op-ed in The Tufts Daily, a student newspaper, seeking the university stop funding groups in Israel that backed the invasion of Gaza.

“The government’s arrest and detention of Rümeysa was unlawful and harmful, as numerous federal court decisions have confirmed that the government had no basis for its actions aside from her constitutionally protected speech,” said Jessie Rossman, legal director of the ACLU of Massachusetts. “Yet even as the government continued a relentless campaign against Rümeysa for nothing more than co-authoring an op-ed, she continued to navigate her studies and her advocacy with strength and grace, and she succeeded in her goal of obtaining her Ph.D. to work towards bettering the lives of children.”