A veteran F.B.I. agent on a bank-robbery detail was fatally wounded yesterday morning, apparently when another agent’s weapon accidentally discharged during a confrontation with three gunmen outside a bank in a quiet town in central New Jersey, the authorities said.

While the circumstances were still under investigation, a statement by the F.B.I. said that the agent, Barry Lee Bush, 52, of the bureau’s Newark office, “may have been fatally wounded as a result of the accidental discharge of another agent’s weapon during a dynamic arrest situation.”

In the 99-year history of the Federal Bureau of Investigation, Mr. Bush, who was married and the father of two grown children, was the 51st agent killed in the line of duty, and the first to be fatally shot in 10 years. He had worked for the bureau for almost 20 years, in Newark, Kansas City, Mo., and elsewhere.

The events yesterday that led to the agent’s death were part of an extensive federal, state and local task force investigation organized in response to a series of bank robberies this year in Middlesex and Monmouth Counties. Teams, some with shotguns, some in SWAT gear, wearing bullet-resistant vests and armed with assault rifles, have staked out some banks in central New Jersey in recent weeks. The team yesterday was following a group of suspects.