William Carlson, 43, of Southern Pines, N.C., and Christopher Glenn Mueller, 32, of San Diego, were "tracking terrorists operating in the region" of Shkin, a village in eastern Afghanistan, when they were killed Saturday, the CIA said in a statement.
Both were veterans of military special operations forces, the CIA said. Carlson served in the Army, and Mueller with Navy special operations.
"William Carlson and Christopher Mueller were defined by dedication and courage," CIA Director George J. Tenet said in a statement. "Their sacrifice for the peoples of the United States and Afghanistan must never be forgotten."
The pair was working for the CIA's Directorate of Operations, which conducts clandestine intelligence-gathering and covert operations. A CIA spokesman would not disclose whether the men worked for a company or contracted individually with the CIA.
The CIA statement says the agency consulted with the dead contractors' families and decided their names could be released without compromising ongoing operations.
They are the third and fourth CIA operatives to die in Afghanistan.
Johnny Micheal "Mike" Spann was killed in November 2001 during an uprising of Taliban prisoners in the northern town of Mazar-e-Sharif. Helge Boes died in a training accident last February.
Taliban and al Qaeda rebels have been launching increasingly bold assaults in recent months, raiding police stations, killing aid workers and confronting U.S. troops in growing numbers.
U.S.-led coalition troops and Afghan militia on Saturday killed 18 rebel fighters during a six-hour firefight in the same area where the CIA men died, the U.S. military said Tuesday.
Six Afghan militia soldiers were wounded in the fighting that began Saturday morning, the coalition said in a statement.
Coalition forces were patrolling 27 miles south of a base in Shkin in Gomal district of Paktika province when they made contact with as many as 25 anti-coalition fighters, the military said.
During an exchange of small-arms fire by the ground forces, A-10 Thunderbolt airplanes and Apache helicopters were called in for airstrikes. One vehicle was destroyed, and the rebels retreated, the military said.
The clash was reported Monday by Afghan officials, but they gave conflicting accounts. A provincial governor said Monday that 22 Taliban had been killed. But a regional military commander said only 10 Taliban died.
Tuesday's statement was the first by the coalition on the incident.
The statement didn't specify if the attackers were former Taliban or al Qaeda terrorists. Remnants of those forces have mounted increasing attacks in Afghanistan's border regions with Pakistan.