Master Sgt. Micheal B. Riley and Sgt. James G. Johnston were killed in action Afghanistan Wednesday. Both men died from small arms fire while engaged in combat operations in the Uruzgan Province supporting Operation Freedom's Sentinel.

Riley, 32, was born in Heilbronn, Germany, and was on his sixth deployment to Afghanistan. Johnston, 24, was born in Trumansburg, New York, and joined the military in 2013.

Riley earned a Bronze Star Medal and a Meritorious Service Medal, among a long list of other awards and decorations from his service. Johnston also earned a Bronze Star Medal, a Purple Heart and many other awards and decorations.

ARMY HERO BECOMES FIRST LIVING IRAQ WAR VETERAN TO RECEIVE MEDAL OF HONOR

"It is with a heavy heart that we learn of the passing of Master Sgt. Micheal Riley in Afghanistan," Col. Lawrence G. Ferguson, commander of the 10th Special Forces Group (Airborne), said. "Mike was an experienced Special Forces noncommissioned officer and the veteran of five previous deployments to Afghanistan. We will honor his service and sacrifice as we remain steadfast in our commitment to our mission."

New York Governor Andrew Cuomo ordered flags in his state flown at half-staff to honor Johnston's sacrifice.

"On behalf of all New Yorkers, I extend our sympathy to the friends, family, and fellow soldiers of Sgt. Johnston," he said in a statement. "His death is a reminder of the sacrifices members of the military make to protect the freedoms and the values that this state and this nation were founded upon."

CLICK HERE TO GET THE FOX NEWS APP

Lt. Col. Stacy M. Enyeart, commander of the 79th Ordnance Battalion (Explosive Ordnance Disposal), also praised Johnston.

"It is with a heavy heart that we mourn the passing of Sergeant James Johnston," she said. "He was the epitome of what we as soldiers all aspire to be: intelligent, trained, always ready. We will honor his service and his sacrifice to this nation as we continue to protect others from explosive hazards around the world."

These deaths, for which the Taliban has taken credit, come as the Trump administration is trying to bring an end to the war in Afghanistan. Secretary of State Mike Pompeo was in Afghanistan Tuesday as part of his recent trip to the Middle East.

"Afghanistan has come far in the last 18 years," he tweeted. "Afghans yearn for #peace and we share their desire to end the conflict."

Fox News' Tyler Olson contributed to this report.