Border Patrol agent Nicholas Ivie was accidentally killed by a fellow agent in what investigators confirmed Friday was a tragic case of "friendly fire."

The Cochise County Sheriff's Office said in a news release that the FBI reached the "indisputable" conclusion that it was friendly fire after doing ballistics testing.

The FBI hedged slightly, saying the investigation into Tuesday's fatal shooting near Bisbee is ongoing but there are strong preliminary indications that Ivie was killed and another agent wounded as the result of an "accidental shooting incident involving only the agents."

The exchange of gunfire occurred at 1:30 a.m. Tuesday between agents who were responding to a tripped ground sensor in the dark in a hilly, rugged area about five miles north of the border near Bisbee.

Cochise County Acting Sheriff Rod Rothrock, whose department is investigating the death jointly with the FBI, said Ivie was approaching from one direction while two other agents were approaching from a different direction. They had communicated and knew all were present, but did not anticipate encountering one another, he said late Friday.

The agents took defensive postures, with Ivie about 20 yards away from the other two agents, Rothrock said. Visibility was minimal because of heavy brush and darkness.

"Apparently, each interpreted defensive postures from the other as aggressive postures," Rothrock said. "Had they been encountering drug smugglers or whoever, their actions would have been appropriate. It's just tragic they encountered each other."

It's unclear who or what tripped the sensor, but it is "definitive" that nobody else was at the scene when the gunfire was exchanged, he said. Illegal border crossers or drug smugglers may have tripped the sensor while moving through the area, he said.

Rothrock's account was the clearest picture yet of what happened.

The FBI didn't answer questions Friday and U.S. Customs and Border Protection Joint Field Commander Jeff Self read only a short statement in a news conference and then left without taking questions.

"We have much to learn and conclude from this incident," Self said. "I ask for the public's patience and understanding during this difficult time."

In addition to Ivie being fatally shot, another agent was shot in the ankle and buttocks. The agent, whose name has not been made public, was released from a hospital after surgery.

The third agent involved in the incident was uninjured.

Rothrock said friendly-fire incidents are not unprecedented in today's law enforcement and military arenas. "These type of events have occurred in the past and will likely occur in the future in law enforcement," Rothrock said.

"It's a reflection of the deadly serious nature of our business."

But federal officials said there are no other known fatalities of Border Patrol agents from friendly fire in the last 40 years.

Officials emphasized that just because Ivie died of friendly fire doesn't diminish the tragedy nor the fact that he died in duty, making the ultimate sacrifice.

"He will be remembered by all of us who served beside him," Self said from the Tucson Sector headquarters in Tucson. "The work of the Border Patrol is dangerous."

"I have a message for Nick's wife, Christy," Self said. "Today, we know that in the uncertainty of darkness the conditions were set and the hand of God brought Nick home. We will always honor his memory."

Self met with Ivie's family on Friday and told them that investigators were coming to believe that it was a "tragic accident, the result of friendly fire."

Ivie, 30, and from Provo, Utah, leaves behind his wife and two daughters, ages 3 and 1.

It remains unknown what will happen with the two suspects taken into custody by Mexican authorities early Tuesday in the area south of the shooting. So far, the U.S. Attorney's Office has not notified the federal Public Defender's Office in Tucson about any suspects, said Heather Williams, first assistant to the federal public defender.

But she said her office has noticed an uptick in illegal border crossers caught near Naco being charged with harsher penalties than normal, which ensures they remain in custody longer.

Ivie's death marked the first fatal shooting of an agent since a 2010 firefight with Mexican bandits that killed U.S. Border Patrol agent Brian Terry in December 2010 near Nogales and brought on congressional probes of a botched government gun-smuggling investigation.

Terry's shooting was later linked to that "Fast and Furious" operation, which allowed people suspected of illegally buying guns for others to walk away from gun shops with weapons, rather than be arrested.

Twenty-six Border Patrol agents across the nation have died in the line of duty since 2002.

Funeral services

The funeral for U.S. Border Patrol agent Nicholas Ivie is set for Monday in Sierra Vista.

The service will be at 10 a.m. at the Church of Jesus Christ of Latter-day Saints meetinghouse, 2100 Yaqui St.

A second funeral service in Utah and a memorial service in Southern Arizona will be announced later, stake president Kevin Goates said.

Contact reporter Brady McCombs at 573-4213 or