Utah mayor Brent Taylor, a major in the Utah National Guard, pleaded with “united” Americans in a moving Facebook post to vote just days before he was killed in an insider attack in Afghanistan.

The emotional appeal came after Taylor witnessed Afghanistan citizens risking their lives to cast their votes.

The “beautiful” turnout of 4 million voters who braved “threats and deadly attacks” was a “success for the long-suffering people of Afghanistan and for the cause of human freedom,” wrote Taylor, the mayor of the small town of North Ogden with a population of 17,000. He became mayor of the town, located an hour north of Salt Lake City, in 2013.

“As the USA gets ready to vote in our own election next week, I hope everyone back home exercises their precious right to vote. 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,” he wrote in his last post.

Taylor, a father of seven young children, also posted photos of people voting in Afghanistan. He ended his post: “United we stand, divided we fall.”

RIP Brent Taylor, who temporarily stepped down as North Ogden mayor to deploy to Afghanistan with the Utah Army National Guard and was KIA today pic.twitter.com/0MeSltIQfw — Jake Tapper (@jaketapper) November 4, 2018

Taylor, who was in Afghanistan serving with the Utah National Guard, planned to continue his duties as mayor when he returned home. He was deployed in January for what was supposed to be a 12-month tour. He had already completed two tours in Iraq, and a previous one in Afghanistan, The Salt Lake Tribune reported. He was working in his current tour as a combat adviser to the Afghan border police, according to the Army Times.

Taylor was killed Nov. 3 in Kabul in an apparent insider attack that also wounded another service member, according to the Department of Defense, reported The Associated Press. The attacker was immediately killed by Afghan forces.

Initial reports indicated the attacker was a member of the Afghan National Defense and Security Forces, the Army Times reported.

Taylor posted his Facebook message on Oct. 28.

CORRECTION: An earlier version of this story mislabeled the location of Brent Taylor’s deployments. He served in Iraq and Afghanistan.