Cops early today charged a man with murder in the fatal stabbings of two subway passengers, authorities said.

The alleged stabber, grilled for most of yesterday, had tried to convince cops he was acting in self-defense after the victims and their friends got on the train drunk and belligerent early Sunday morning and began menacing passengers.

Brendy Garcia, 19, of Brownsville, Brooklyn, who is suspected of wielding the knife was charged in the double homicide.

Police said today that two other men — Franklin Varella, 21 of Inwood, in Manhattan and Diogenes Hernandez, 21, a JFK baggage handler who lives in Woodhaven, Queens — were not charged and released.

Garcia, who has no criminal record, confessed to the stabbings, sources said. But he insisted he wielded his knife in an attempt to fend off the drunken men after they had clocked him in the head with a beer bottle.

He faces an additional charge of weapons possession.

The dead men, Darnell Morel and Ricardo Williams, had gotten on the No. 2 train at Times Square at 5 a.m. Sunday with about eight friends.

Both victims, along with several others in their group, had police records.

All of them had spent the night partying at Cellar Bar in The Bryant Park Hotel.

As soon as they boarded the train, they began menacing the passengers, according to the suspects’ friends and other witnesses.

The witnesses said the gang woke a homeless man, then terrified a young woman.

After she fled the train, they allegedly confronted other riders, including the stabber and the other two suspects. They were returning home from a baby shower in The Bronx, a source said.

Soon, the victims and their pals began lobbing trash at the smaller group, the witnesses told cops.

The 19-year-old was hit with the bottle and furious words were exchanged.

The larger gang allegedly began moving toward the smaller group. They started fighting as the train traveled between the 14th Street and Christopher Street stations.

Both groups had been drinking on the train, cops said.

The victims’ friends, who got off at Houston Street, told the cops a very different story.

They claimed that one of the them had accidentally hit the killer with a trash bag aimed for a garbage can on the platform, and that act sparked the mayhem.