BUFFALO, N.Y. -- The family of a Western New York army captain killed in action while serving in Afghanistan released a statement to Western New Yorkers Tuesday.

"We cannot put into words what the outpouring of love and prayers for Andy and our family has meant to us," the statement says. "While our hearts are broken, your kindness helps us to carry on to honor our selfless soldier. Please continue to pray for all of our men and women in uniform who put themselves in harm’s way for our freedom and the freedom of people everywhere."

Capt. Andrew Byers, who is originally from Clarence, was one of two U.S. soldiers killed last week in Afghanistan. A private funeral service is set for Friday.

Capt. Byers and Sgt. 1st Class Ryan Gloyer died Thursday in Kunduz, Afghanistan, from wounds sustained while engaging enemy forces.

Both men were assigned to B Company, 2nd Battalion, 10th Special Forces Group, at Fort Carson, Colorado.

Byers and Gloyer were killed along with 26 civilians and three Afghan troops.

Four other American troops were wounded.

The soldiers came under fire during a “train, advise and assist mission” with Afghan troops, Defense Secretary Ash Carter said in a statement. The soldiers were working to clear a Taliban position and disrupt the group’s operations in Kunduz district.

Byers, 30, was living in Rolesville, North Carolina, but is a Clarence native, according to a Clarence High School employee who said Byers attended the school and graduated in 2004. Byers joined the Army in May 2008, arriving at Fort Carson in July 2014.

Capt. Byers is remembered as an outstanding student and young man.

"Andrew was probably the most kind, respectful, funny kid who was just a class act that any parent would be so incredibly proud to call their own," says Kathy Konitsch.

Konitsch is a library aide at Clarence High School. She's known the Byers family for years.

"Seeing him, his smile, was, he has an infectious smile," Konitsch says.

She says Capt. Byers, who was on the yearbook committee and swim team, always wanted to go to West Point. She recalls when he found out he had been accepted.

"You could see his eyes were just so lit up. He was so excited to be able to serve his country and to be part of such a prestigious institution," said Konitsch.

Konitsch will remember Byers as a role model for both young and old.

“There are no words sometimes of how he just, certain children, certain kids come in and you think you make an impact on their lives, but they actually make an impact on your own," she says.

Byers’ history teacher inspired him to join the military. 2 On Your Side’s Kelly Dudzik spoke with him on the phone Friday night. He's heartbroken and echoed what Konitsch had to say.

Byers, a Special Forces officer, had deployed once to Afghanistan, once to the Democratic Republic of Congo, and served in Italy.

His awards and decorations include the Bronze Star Medal, Purple Heart, three Army Commendation Medals, the Afghanistan Campaign Medal with Campaign Star, Iraq Campaign Medal with Campaign Star, the Combat Infantryman Badge, the Expert Infantryman Badge, the Parachutist and Military Free Fall Parachutists badges, the Ranger tab and Special Forces tab.

Gloyer, 34, was from Denton, Pennsylvania. He joined the Army in December 2004 and had served at Fort Carson since January 2015.

A Special Forces communications sergeant, Gloyer had deployed three times to Afghanistan and once to the Democratic Republic of Congo.

Gloyer’s awards and decorations include the Bronze Star with V device, Bronze Star, Purple Heart, two Meritorious Service Medals, two Army Commendation Medals, the Afghanistan Campaign Medal with Campaign Star, the Combat Infantryman Badge, the Expert Infantryman Badge, the Parachutist Badge, the Ranger tab and the Special Forces tab.

Afghan officials said they were still investigating the attack and its civilian casualties, some of which may have been caused by airstrikes, the Associated Press reported. Residents later carried more than a dozen corpses of the dead, including children, toward the local governor's office in a show of rage a year after American forces attacked an area hospital, according to the AP.

Two senior Taliban commanders targeted in the raid were also killed, along with 63 other insurgents, Kunduz police chief Gen. Qasim Jangalbagh said, according to the AP. He said Afghan special forces carried out the raid and that he did not have any information about NATO involvement in the assault. The general identified the number of civilians killed, saying the count of 26 included members of the Taliban fighters' families.

Brig. Gen. Charles Cleveland, briefing journalists in Brussels during a teleconference, said three Afghan troops were killed in the assault, the AP reported. Mohammad Radmanish, a deputy spokesman at the Afghan Defense Ministry, offered the same figure.

In a later statement, Cleveland said that "friendly forces received direct fire and airstrikes were conducted to defend themselves" and an investigation was underway. He earlier described the assault as "not a common event," without elaborating.

Fighting has been fierce in Kunduz province, as Taliban fighters briefly overran the city of Kunduz — the provincial capital with the same name — in early October, a show of strength by the insurgents that also highlighted the troubles facing Afghan forces 15 years into the war there, AP reported. The Taliban captured and held parts of Kunduz a year earlier as well before the city was liberated weeks later with the help of U.S. airstrikes, AP reported.