U.S. Army Chaplain Scott Squires was facing a recommendation he be charged with dereliction of duty after he rescheduled a soldier in a same-sex marriage, which violates the tenets of his Southern Baptist faith, from his own marriage retreat to one led by a chaplain with no such conflict.

On Friday, the Army announced Major General Kurt Sonntag had decided it would not pursue charges against Squires, a Bronze Star recipient with multiple combat deployments. In the seven month ordeal, both Squires and his assistant, Staff Sgt. Kacie Griffin, were facing not only the end of their military service, but time in prison for their supposed discrimination against an LGBT soldier.

“We are grateful that the Army has rejected and abandoned these baseless charges,” Mike Berry, Deputy General Counsel and Director of Military Affairs at the First Liberty Institute, the religious freedom focused public interest firm representing Squires, said in a statement on learning of the Army’s decision. “The United States military is no place for anti-religious hostility against its own military chaplains. Chaplains like Scott Squires [and his] assistant Kacie Griffin do not have to give up their First Amendment rights in order to serve their fellow soldiers.”

Squires’ and Griffin’s careers and freedom were put in jeopardy after a soldier in a same-sex marriage filed a complaint after Squires moved that solider out of his “Strong Bonds” marriage retreat three days after she registered for it. Defense Department guidance dictates that chaplains follow the tenets of the religions that sponsor them. In Squires’s case, the North American Mission Board of the Southern Baptist Convention, which does not recognize gay marriage as valid.

The soldier would have been able to attend a Strong Bonds retreat the next time it was led by a chaplain whose religion did recognize same-sex couples as “married” and was not therefore forbidden from allowing that soldier along. She, however, never did attend a later retreat.

The Army investigator assigned to the case, a Maj. Ford, initially thought simply telling a gay soldier your religion prohibits endorsing gay marriage was “illegal discrimination.” He was later forced to admit in his report this was not the case and that he had made a mistake in trying to hold Squires and Kacie accountable on that basis.

But the investigator did not stop there and issued a full report concluding that Squires — and Griffin, who did nothing more than file the necessary paperwork — be court martialed because of the their three day delay in removing the soldier in the same-sex marriage and informing the soldier and his own superior officer of the reason. In doing so, the investigator ignored a sworn statement from Squires’ commanding officer showing Squires had contacted him within minutes of meeting with the gay soldier to explain why he was unable to counsel her on her marriage to another woman. The investigator had that sworn statement in his own exhibits but wrote there was “no evidence” Squires had contacted his superiors.

Squires and Griffin were, according to the report, violating Army Equal Opportunity policy and Griffin in particular was derelict in her duty as an “equal opportunity leader.” In making this case, Maj. Ford repeatedly made use of rhetoric nearly identical to that of left-wing activist groups when arguing against religious freedom. The tenets of Squires’ religion are referred to as “preferences.” Ford repeatedly claims the First Amendment does not protect Squires because it was only intended as a “shield,” not a “sword” to violate gay rights.

On Friday, General Sonntag, the officer with final say over Squires’ prosecution, put the matter to rest. No charges against Griffin were made, but that decision did not come before she lost a competitive Army college scholarship she had won over the matter.

“I look forward to being able to focus on continuing my career serving my fellow soldiers,” Squires said in First Liberty’s press release. “I am eternally grateful to First Liberty for covering my six and fighting to restore my religious liberty.”

Activist Mikey Weinstein, founder of the Military Religious Freedom Foundation, would have preferred a different outcome. He would have the Army prohibit chaplains from the Southern Baptist Convention, the largest Protestant denomination in America, with around 15 million congregants.

“Our argument is [Defense Secretary Jim Mattis] ought to disqualify that particular entity as a chaplain endorsing agency,” Weinstein, who has spent much of his career suing the military over Christian service members proselytizing and other perceived slights against non-Christians, told the Army Times. “If you’re going to view same-sex couples as a sin against god, you can either hold your tongue, change your attitude, or get out of the military.”