(CNN) -- The Virginia man who pleaded guilty to shooting a Family Research Council employee last year was sentenced Thursday to 25 years in prison.
Floyd Corkins has said he disagreed with the Family Research Council's stance against gay marriage.
The shooting took place at the conservative policy group's office in Washington. The research council, a Christian group that focuses on family, anti-abortion and religious liberty issues, views homosexuality as harmful.
Before sentencing, Corkins expressed remorse to building manager Leo Johnson, who Corkins shot in the arm. "I realize resorting to violence to achieve political ends is never OK," Corkins said.
Johnson, who struggled with Corkins and disarmed him, also spoke before the sentencing. "I forgive you but I do not forget," he said. "If you believe in God you should pray to him every day because not only did God save my life that day, he saved yours, too."
Johnson said he didn't shoot Corkins after managing to get control of the gun because God spoke to him and told him not to do so.
Corkins, 29, pleaded guilty in February to committing an act of terrorism while armed, assault with intent to kill while armed and interstate transportation of a firearm and ammunition.
David Bos, Corkins' federal public defender, said his client was diagnosed with a mental illness six months before the August 2012 shooting and starting taking prescribed medication.
Bos said that didn't excuse the shooting but should be taken into account. The lawyer recommended Corkins receive a sentence of 11 years and three months.
Prosecutors argued Corkins should receive 45 years in prison. The government said Corkins did suffer from mental illness but wanted to take medication only so he could think more clearly about his plot. Prosecutors said Corkins was able to carefully plan, rehearse and then conduct his attack.
If Johnson had not interceded, they argued, many people at the Family Research Council might have been killed or wounded.
"Earlier this week we were reminded what the consequences can be of one man well-armed," said prosecutor Patrick Martin. "Mr. Corkins was no less determined than the Navy Yard gunman."
When Corkins was arrested investigators found 15 Chick-fil-A sandwiches in his backpack. He told the FBI he planned to kill as many people as he could at the research council and then smash the sandwiches in their faces. The head of Chick-fil-A had announced opposition to gay marriage.
"Today's 25-year prison sentence demonstrates the steep price to be paid for turning to violence to terrorize your political enemies," said U.S. Attorney Ronald Machen.