A Utah mayor was killed in Afghanistan during an "insider attack" while serving with the Utah National Guard in Kabul, the second deadly such attack in the war-torn country in less than a month.

North Ogden Mayor Brent Taylor, 39, a married father of seven, was killed and another soldier was wounded Saturday by a member of the Afghan National Defense and Security Forces, Major General Jeff Burton, who leads Utah's National Guard, confirmed Sunday.

Initial reports indicated the attacker was killed immediately by other Afghan Forces, Burton said.

"Brent typified the citizen soldier who served so diligently in his community as well as felt this call to wear a uniform and serve where ever the nation needed him to go," Burton said. "He's a heavy loss for us."

More:’Insider attack’ kills US service member in Afghanistan

More:Afghan army helicopter crashes, killing all 25 on board

Burton and the Pentagon said the attack was under investigation and released no other details.

Last month an Afghan bodyguard opened fire at a meeting in Kandahar province between local leaders and the top U.S. commander in Afghanistan. Three senior provincial officials were killed and three Americans were wounded, although Gen. Austin Miller was unharmed.

Taliban militants, who have experienced a recent resurgence in Afghanistan, claimed responsibility for that attack. NATO and U.S. forces have deployed more troops to support Afghan forces struggling against the Taliban and remnants of the Islamic State active in the country. Taylor, part of that effort, had said he was in Afghanistan to help train Afghan troops.

James Piazza, a Penn State professor specializing in political violence in the Islamic world, says there are reports of "severe demoralization" and desertion among Afghan troops.

"Attacks like this threaten to drive a wedge between U.S. military personnel and Afghan forces," Piazza told USA TODAY. "If U.S. military personnel, sent to Afghanistan to help support and train Afghan forces, don't trust their Afghan counterparts, it's hard to imagine that our support will be very effective."

Major Taylor served as mayor of North Ogden's 17,000 residents since 2013. He also served more than a decade as an officer in the National Guard, including seven years on active duty. He previously served two tours in the Iraq War and one in Afghanistan.

Taylor began another one-year tour in Afghanistan in January. Local police gave him a police escort on the day he left, and hundreds of residents lined the streets to pay him homage, The Salt Lake Tribune reported. He watched on Skype as his youngest daughter learned to walk. In September, he wished his "rock star" wife a happy 15th anniversary on Facebook.

Utah Lt. Gov. Spencer Cox called Taylor's death "devastating".

"I hate this. I’m struggling for words," Cox said in a Facebook post. "I love Mayor Taylor, his amazing wife Jennie and his seven sweet kids. Utah weeps for them today."

Taylor, a doctoral candidate in international relations at the University of Utah, frequently posted photos from the war zone on social media. He was consistently upbeat, even noting in an April post that "I absolutely love the dedicated US and Afghan soldiers I serve with every day. The dedication of the Afghan soldiers is especially inspiring."

His most recent post, Oct. 28, expressed admiration for millions of Afghans who braved threats and attacks to vote in parliamentary elections last month.

"As the USA gets ready to vote in our own election next week, I hope everyone back home exercises their precious right to vote," he said. "And that whether the Republicans or the Democrats win, that we all remember that we have far more as Americans that unites us than divides us. ... God Bless America."

Sen. Orrin Hatch, R-Utah, called Taylor a "hero, a wonderful father and a dear friend." Utah Gov. Gary Herbert said he was "heartbroken."

"This is a sad day for Utah, for America," Herbert said. "He was the personification of love of God, family and country."

Cox and, referring to Taylor's elections Facebook post, asked Utah residents to honor the mayor by voting on Tuesday.

"This war has once again cost us the best blood of a generation," Cox said. "Thank you for your sacrifice, my friend."