He had a motto he often repeated in tough times, his brother, Joel, said: "Cowboy up."
"If Nick were here he'd say, 'Guys, I'm taken care of. Just take care of my girls, my wife and my family,'" Joel Ivie, also an agent, said during the funeral.
Ivie was killed Tuesday as he and two other agents responded to a sensor alarm aimed at detecting smugglers crossing into the U.S. The shooting occurred at night about 5 miles north of the border near Bisbee.
The FBI said the incident appeared to be friendly fire involving only the agents.
Joel Ivie described his brother as a selfless man who "never said a bad word about anyone."
"Nick's girls were his pride and joy," he said of his brother's two young daughters.
While choking back tears, Joel Ivie said his brother loved the rugged hills of the remote border territory he patrolled.
"Nick died in a beautiful place. The hills he was working in, he was very familiar with," he said.
Fellow agent and neighbor Aaron Kerr said Ivie "lived a life of quiet dignity."
"He was the type of agent everybody wanted to work with," Kerr said, periodically wiping tears from his eyes.
The standing-room-only funeral was held at a Church of Jesus Christ of Latter-day Saints meeting house in the small town of Sierra Vista, about 30 miles west of where the shooting occurred.
The crowd chuckled when Kerr recounted Ivie's favorite breakfast brownies and Dr Pepper.
"He was just a good old boy," Kerr said.
Meanwhile, the investigation continued into the shooting that also injured an agent who has since been released from the hospital.
Joel Ivie said he was told his brother had installed the sensor the three agents were responding to that night.
The head of the U.S. Border Patrol agents' union said Ivie apparently opened fire on his two colleagues thinking they were armed smugglers, and was killed when they shot back.
Ivie, 30, apparently fired first but it remained unclear why, National Border Patrol Council President George McCubbin said.
McCubbin and Acting Cochise County Sheriff Rod Rothrock, who is assisting in the investigation, said Ivie knew the two other agents also were heading to the area on foot, and they knew he was responding. But the three apparently didn't know they were so close together.
"It was dark, very, very rugged terrain, and what they could see of each other was further obscured by the fact that there was brush and cacti and stuff like that between them," Rothrock said.
When the agents spotted each other in the dark, "they apparently took defensive postures, which was probably interpreted as aggressive postures like readying your weapons, for example," he said. Rothrock has said he doubted any criminal charges would be filed.
Kent Lundgren, chairman of the National Association of Former Border Patrol Officers, said the agency doesn't provide specific training to guard against friendly fire. But he noted its training emphasizes "situational awareness," in which agents are urged to pay close attention to their surroundings, and never fire their weapons without cause.
"You don't fire blind rounds in the dark," Lundgren said. "You shoot at a target that you identify as hostile and nothing else. That's gospel."
Retired agent Jim Dorcy said agents are trained to fire their weapons in only three situations self-defense, or to protect a fellow officer or an innocent third party.
"As part of that training, it's probably the primary lesson that is taught, that is never fire your weapon when someone is in front of the weapon that shouldn't be in the line of fire," he said.
While noting he didn't want to speculate until the investigation was complete, Dorcy said something certainly appears to have gone terribly wrong.
"None of them should have started firing unless they were returning fire from a smuggler or whatever the perpetrator might have been," he said. "Unless they were returning fire at something like that, there shouldn't have been any gunfire at all."
Dorcy added agents rarely fire their weapons while on duty.
"Every time something like this happens, it creates a new training scenario," he said. "I'm sure they will dissect what happened there once they know, and they will probably add that to their training regimen."
The Border Patrol declined to comment about agent training.
Ivie's death marked the first fatal shooting of an agent since a deadly 2010 firefight with Mexican gunmen that killed U.S. Border Patrol Agent Brian Terry in December 2010 and spawned congressional probes of a botched government gun-smuggling investigation.