The couple had seven children: Lincoln, 11, and Alex, 9, who were with their mother in Delaware on Tuesday, and Megan, 13; Jacob 7; Ellie, 5; Jonathan, 2; and Caroline, 11 months.

In a letter to Ms. Taylor that was shared on Twitter, an Afghan National Army pilot, Maj. Abdul Rahman Rahmani, credited Major Taylor with changing his views on family and democracy. In the letter, Major Rahmani said he had flown on assignments with Major Taylor and had worked with him to train Afghan forces.

“Please pass my words to your seven children, whom I consider as brothers and sisters to my own five children, Taha, Taiba, Tawab, Aqsa and Wahab,” the letter reads. “Tell them their father was a loving, caring and compassionate man whose life was not just meaningful, it was inspirational. I gained a great deal of knowledge from him and I am a better person for having met him.”

The Pentagon said on Monday that Major Taylor was killed and another service member wounded as a result of an “apparent insider attack,” and that the episode was under investigation. Many American casualties in Afghanistan in recent years have come in insider attacks.

Major Taylor’s death has hit hard in North Ogden, the middle-class suburb north of Salt Lake City where he had been mayor since 2013. The family was told that it may take the military as long as 10 days before his body could be handed over to his family. But the city is planning to hold a vigil for him on Saturday just the same, in an amphitheater that Major Taylor had expanded into a community gathering place that staged its first musical over the summer.