A federal court in Kansas has ruled that the adopted daughter of a now-retired Army officer — who missed a key immigration deadline for her while he was deployed to Afghanistan — will have to leave the U.S., her father confirmed Monday.

Former Army Lt. Col. Patrick Schreiber and his family had put off formal adoption of now-daughter Hyebin in 2013 because he was about to deploy for a year as the director of military intelligence for the 4th Infantry Division at RC-South. He and wife Soo Jin legally adopted Hyebin after he got back, then started the official paperwork to seek citizenship for her. She had just turned 17.

But the U.S. immigration law cutoff for a foreign-born adopted child to become a naturalized citizen is 16, and on Friday a U.S. District Court in Kansas ruled in favor of U.S. Citizenship and Immigration Services that there would not be an exception in Hyebin’s case. She is allowed to complete her degree in chemical engineering at the University of Kansas, which she will do next year. Then she must return to Korea, Schreiber said Monday.

The family is planning to file an appeal, but is preparing for the reality that it’s likely Hyebin will not be allowed to stay, Schreiber said.

“As I tell my daughter, life isn’t fair,” Schreiber said Monday. “The main thing is to be resilient."

“It was disappointing, but we’ve always known this is not the end of the road,” said family attorney Rekha Sharma-Crawford. “But it’s still hard on this family.”

Schreiber served in the military for 27 years, meeting his wife Soo Jin while he was serving as a tank company executive officer and in other positions in Korea with 1st Battalion, 72nd Armor Regiment in the late 1990s. Hyebin was Soo Jin’s niece, and when Hyebin’s home life became too difficult, Schreiber and his wife took her in as their own daughter.

× Fear of missing out? Sign up for the Early Bird Brief - a daily roundup of military and defense news stories from around the globe. Thanks for signing up. By giving us your email, you are opting in to the Early Bird Brief.

During his military career, Schreiber jumped with the 82nd Airborne Division into Panama during Operation Just Cause, served in Desert Shield and Desert Storm, deployed to Iraq from 2005 to 2006 and then again from 2007 to 2008. He was sent to Afghanistan from 2010 to 2011 and then again from 2013 to 2014. He retired in 2015 and still works for DoD as a contractor.

If the family loses its appeal, all of them will move to Korea, Schreiber said.

Editor’s note: the name of the federal agency involved in this case was updated to reflect its correct name.