An Afghan national army pilot who served alongside Utahn Brent Taylor, a major in the National Guard who was killed in an insider attack Saturday while stationed in Kabul, wrote a letter to Taylor’s wife. In it, he mourns the loss of his comrade, remembers him as a “compassionate man” and credits him for changing his views on family and democracy.

“I gained a great deal of knowledge from him and I am a better person for having met him,” wrote Abdul Rahman Rahmani in the note that he shared on Twitter.

Rahmani, a major and pilot with the Special Mission Wing, said he flew on assignment with Taylor and grew close to him as they worked together to help Afghanistan train its own forces. Taylor had temporarily left his post as mayor of North Ogden in January to serve in his second deployment to the country and his fourth overall — including two others in Iraq — during his decadelong career with the Utah National Guard.

Taylor’s remains will return to the United States early Tuesday morning at Dover Air Force in Delaware. Funeral plans are still pending.

The Utah mayor posted often on Facebook about the Afghan soldiers whom he interacted with, saying he was inspired by their dedication. Rahmani wrote in his letter that Taylor was the inspirational one.

“He died on our soil but he died for the success of freedom and democracy in both of our countries.”

Taylor, 39, died Saturday while on a foot patrol when an Afghan soldier attacked him. Other Afghan fighters quickly killed the assailant, according to NATO. Utah National Guard Maj. Gen. Jefferson S. Burton has described the attack, which remains under investigation, as a betrayal.

Rahmani has asked Taylor’s family not to view “the violent act that took his life as representative of us or our sentiments toward Americans.”

“I assure you that the one who shot him represents evil and violence,” he said, noting that he has lost eight members of his own family to the war and been wounded twice himself.

There are fewer than 14,000 U.S. troops in Afghanistan this year, which is a significant drop from the 100,000 there in 2011, when the war was still considered a combat mission. Most of those soldiers are focused on advising Afghan forces, but that leaves them susceptible to insider attacks.

Rahmani said Taylor always volunteered for tough assignments, was humble and “a true patriot.” He added in a message to The Salt Lake Tribune on Monday that the biggest impact Taylor had on him was with his family.

He said the major talked about his wife and seven kids back home in Utah, how they were “everything” to him. Rahmani said before he met Taylor, he didn’t think men and women should be treated equally and he wouldn’t say his wife’s name out loud.

“You may or may not be aware of some of our cultural differences,” he wrote in the letter, addressed to Taylor’s wife, Jennie, “but in Afghanistan family is not everything, for many of us, family are treated as property.”

But Taylor, he told The Tribune, “changed a conservative man to a liberal who can [say] his wife’s name loud out for the whole world to hear.” And, Rahmani added, Taylor taught him to “love my wife Hamida as an equal and treat my children as treasured gifts.”

“On behalf of my family and Brent’s friends here in the Special Mission Wing, we pledge to continue to work hard until the end, the day when peace will return to our country and violence and hatred no longer claim the lives of both of our countrymen.”