It was a bloody end to Memorial Day weekend in New York City with several people shot and at least two stabbed throughout the boroughs.

A retired NYPD officer allegedly shot a man to death who tried to carjack him early Tuesdaymorning in Brooklyn, police said.

The former officer, who's name was not released, was sitting in his car at about 3:10 a.m. on the corner of Georgia Avenue and Linden Blvd when two men approached. The first man, identified as 18-year-old Manuel Ocampo, allegedly demanded money from the officer. Police said the officer got out of the car and Ocampo got in -- pointing a gun at the officer.

The retired cop then fired his own gun, hitting Ocampo -- who police said lived in Coney Island -- in the head and killing him. A firearm was recovered from Ocampo, police said, who has several sealed juvenile records and an arrest from November 2013 for criminal possession of a controlled substance.

Police said the second suspect, an 18-year-old man who's name was not released, ran away but was later apprehended. It is unclear if the retired officer will be charged.

In a separate incident, two 18-year-old girls and a 24-year-old man were shot in separate locations after attending a party on 96th Street in Canarsie.. Police found all three a few blocks away from the party, near Avenue M shortly, after 10 p.m. Monday. They were taken to Brookdale University Hospital and Medical Center where they are expected to survive. The circumstances surrounding the shooting are unclear.

A 20-year-old man was shot to death in Brooklyn early Tuesday morning in an unrelated incident. Police said the man, whose name was not released, was shot in his neck inside an apartment on 49th street in Sunset Park. There were no arrests in the incident, police said.

In Manhattan, an 18-year-old man was shot in the leg at about 2:10 a.m. Tuesdayon La Salle Street in Morningside Heights. He was taken to Mount Sinai St. Luke's Hospital where he is expected to survive. Police said a 25-year-old man was shot in his right upper thigh in Inwood on West 204th Street near Vermilyea Avenue just after 3:30 a.m. Tuesday. He was taken to Harlem Hospital in stable condition. The incidents were unrelated.

Police said at least two people were stabbed early Tuesday morning. In the first incident two men were allegedly harassing people on the platform before boarding a Brooklyn-bound Q train at Atlantic Avenue. Police said one of the suspects started to film a 50-year-old man sitting on the train when the second suspect allegedly walked up to him and slapped him at about 2:20 a.m. They demanded money, which the victim gave them, and then moved to another car.

In the second car, police said they approached another man and demanded money again. They then allegedly punched him, hit him in the back of the head with brass knuckles and stabbed him in his upper, left abdomen. They then allegedly took his hat and fled, but police said the knife and hat were found nearby.

The second victim sustained a shallow cut and was taken to a local hospital, police said. A total of $25 was taken.

In the second incident, two teens -- about 16 and 19 years old -- slashed an 18-year-old man multiple times on a southbound No. 4 train at about 3:30 a.m. Police said one of the suspects said "what's up?" before they allegedly started to beat him up. Both men fled at the 116th Street station at Lexington Avenue. The victim, whose name was not released, was taken to Mount Sinai St. Luke's Hospital.