LOCKPORT – Marlyn M. Rubin has become the second man to plead guilty in connection with the near-fatal shooting of a Niagara Falls teenager, but the story he told Thursday in Niagara County Court didn’t match the one another defendant told last week.

Rubin, 20, of Niagara Street in the Falls, told County Judge Matthew J. Murphy III that the last man he saw with a gun was Jacob J. Taggart, 23.

“I heard shots, but I have no idea who actually fired them,” Rubin said.

Last week, Paul E. Buck Jr., 21, said he was the one who shot Anthony McDougald, 18, at 12th and Niagara streets April 25.

Deputy District Attorney Doreen M. Hoffmann said it doesn’t matter much who pulled the trigger, because all the defendants are charged as accomplices to each other.

McDougald was left with a bullet lodged near his heart that surgeons cannot safely remove.

Rubin said his friend Buck got into an argument with McDougald before Taggart and a fourth man, whose name Rubin didn’t know, arrived on the scene.

They all followed McDougald in a car, and Rubin said he saw Taggart with a handgun inside the auto. The car stopped, and Rubin said he and Buck emerged to fight McDougald.

“I was about to have a fist fight with him,” Rubin said. Then he heard three gunshots.

Rubin accepted a plea offer to second-degree assault, the same charge Buck admitted to last week. Both have agreed to testify against Taggart, and both face maximum prison sentences of seven years when they return to court March 21. Taggart, a repeat felon, faces a maximum of 25 years if he is convicted on the first-degree assault and reckless endangerment charges filed against him.

In another case Thursday, a Wheatfield man pleaded guilty in the July 15 stabbing of a man outside a North Tonawanda bar.

Joshua C. Oakes, 25, of River Road, admitted to a reduced charge of attempted first-degree assault. County Judge Sara Sheldon Farkas agreed to give Oakes no more than seven years behind bars when he is sentenced March 14. The maximum for the charge would have been 15 years.

Oakes, whose record includes a 2008 first-degree assault conviction in Orange County, Calif., was charged with stabbing Paul Diesing, of North Tonawanda, three times in the torso and twice in the leg outside Ava’s Place on Webster Street.