WASHINGTON — On a sweltering day earlier this summer, operatives with the Central Intelligence Agency gathered at Arlington National Cemetery to bury two of their own. Brian Ray Hoke and Nathaniel Patrick Delemarre, elite gunslingers who worked for the C.I.A.’s paramilitary force, were laid to rest after a firefight with Islamic State militants near Jalalabad in Afghanistan, close to the border with Pakistan.

There had been scant mention of Mr. Hoke’s death in local news reports in Leesburg, Va., his home, and nothing at all about Mr. Delemarre in news accounts in the Florida Panhandle, where his family lives. Their deaths this past October were never acknowledged by the C.I.A., beyond two memorial stars chiseled in a marble wall at the agency’s headquarters in Langley, Va.

Today there are at least 18 stars on that wall representing the number of C.I.A. personnel killed in Afghanistan — a tally that has not been previously reported, and one that rivals the number of C.I.A. operatives killed in the wars in Vietnam and Laos nearly a half century ago.

The deaths are a reflection of the heavy price the agency has paid in a secret, nearly 16-year-old war, where thousands of C.I.A. operatives have served since the attacks of Sept. 11, 2001. The deaths of Mr. Hoke, 42, and Mr. Delemarre, 47, show how the C.I.A. continues to move from traditional espionage to the front lines, and underscore the pressure the agency faces now that President Trump has pledged to keep the United States in Afghanistan with no end in sight.