A U.S. Army carry team transfers the remains of Capt. Andrew M. Pedersen-Keel at Dover Air Force Base in Delaware Tuesday, March 12, 2013. The 28-year-old Pedersen-Keel was a member of Company B, 1st Battalion, 3rd Special Forces Group out of Fort Bragg, N. C.

As Gov. Dannel P. Malloy ordered flags to fly at half-staff Wednesday, he said Army Capt. Andrew Michael Pedersen-Keel made the ultimate sacrifice to defend the state and the nation.

Pedersen-Keel, 28, of Madison died Monday of injuries incurred when he was attacked by small arms fire during a patrol in the Jalrez District of Afghanistan, according to the Department of Defense. Staff Sgt. Rex L. Schad, 26, of Edmond, Okla., also was killed.

According to a statement from Malloy, Pedersen-Keel was killed by a member of the Afghan National Police.

Pedersen-Keel was assigned to Company B, 1st Battalion, 3rd Special Forces Group (Airborne), Fort Bragg, N.C. He graduated in 2002 from the Avon Old Farms School, a boys' boarding school in Avon, before going to the U.S. Military Academy. His mother, Helen, and stepfather, Robert, moved to Madison in 2003, the town's first selectman, Fillmore McPherson, said.

"It's always a loss when one of these fine young men is killed, and it's doubly a loss when you have a local connection like this," McPherson said Wednesday. "The entire town is reaching out to the parents at this time of their grief."

This was Pedersen-Keel's second deployment in support of operations in Afghanistan.

"Our thoughts are with his family, his friends and his unit during this very difficult time," Malloy said Wednesday. "We pray for a safe homecoming for our troops who are stationed around the world and thank them for their bravery and service."

"This is a tragic and sad reminder that even as the conflict in Afghanistan is winding down, there are still hundreds of Connecticut soldiers in harm's way," Lt. Gov. Nancy Wyman said. "Capt. Pedersen-Keel and every one of the other 63 brave men and women from our state lost in Afghanistan and Iraq died defending us and our freedom, and that sacrifice must never be forgotten."

The Connecticut National Guard notified Pedersen-Keel's mother at her home on Monday night and escorted her to Dover Air Force Base to observe the dignified transfer of remains Tuesday, said Col. John Whitford, spokesman for the Connecticut National Guard. A casualty assistance officer was assigned to her. Pedersen-Keel's father lives in Florida.

Pedersen-Keel was commissioned as an infantry officer after he graduated from West Point in 2006. After further training, he was assigned to the 3rd Brigade Combat Team, 1st Infantry Division (Light) at Fort Hood, Texas, and deployed to Afghanistan for a year in June 2008. He served as a company executive officer and platoon leader.

When he returned home, he volunteered for the Special Forces Assessment and Selection Course. After completing the course and language training, he was assigned in August as a detachment commander to his current unit in Fort Bragg. The unit then deployed to Afghanistan.

Pedersen-Keel's awards and decorations include two Bronze Stars and the Army Commendation Medal. He is survived by his parents and a sister.

Flags will remain at half-staff until his burial. The funeral arrangements have not been completed, but McPherson, who has spoken with the Army liaison for the family, said he was told the burial will be at Arlington National Cemetery.

"That would suggest that there will not be a funeral here, but there may very well be a memorial service at some point," McPherson said. "We would like to render full honors but we will adhere to what the family requests."

As of Thursday morning, no decision had been made yet on any of the arrangements, Whitford said. That information will be forthcoming.

j.mcdermott@theday.com

Capt. Andrew M. Pedersen-Keel, 28, of Madison, died March 11, 2013, of wounds received from small-arms fire in Wardak Province, Afghanistan.