Authorities said Mendez and Officer Raul Ortiz had just arrived at work around 11 p.m. on October 12 when they heard a commotion.
The two officers heard breaking glass and saw several people breaking into a car in the parking lot at Philadelphia International Airport.
A confrontation ensued, and the two officers and one of the suspects were shot.
[Ads /]
Mendez, 50, who had been on the force for more than two decades, was shot four times and pronounced dead at the hospital.
Ortiz, a 60-year-old and a 20-year veteran of the force, was shot once in the arm and released from the hospital a couple of days later.
Three men were arrested the following week in connection with the shooting.
All three men, identified as 21-year-old Alexander Batista-Polanco of Camden, New Jersey, 21-year-old Hendrick Pena-Fernandez of Pennsauken, New Jersey, and 18-year-old Yobranny Martinez Fernandez of Camden County, New Jersey, were charged with murder in connection to Mendez's death.
A fourth person believed to have been involved in the murder, 18-year-old Jesus Herman Madera Duran, was killed in the shooting.
In court on Wednesday, the prosecution played the call Ruiz made the night he and Mendez were shot.
Two people, who witnessed the shooting in the parking lot of Terminal D, also testified.
[Ads /]
One witness said as she was looking for her car in the parking garage, she heard a struggle and several gunshots.
On the phone with her husband at the time, she told him to call 911 while she ran away and hid behind a car.
The witness told the judge she then saw a large, black SUV speed out of the parking garage.
A homicide detective with Philadelphia police spent 40 minutes speaking about that black SUV. He said it was a Dodge Durango that was stolen from Southwest Philadelphia four days before the deadly shooting.
The detective explained how cellular data and surveillance images were used to track that Dodge Durango the night of the murder.
He showed pictures of the SUV entering the airport parking garage around 10:30 p.m. and exiting about 30 minutes later.
The car was then spotted outside the Children's Hospital of Philadelphia, according to the detective. Surveillance video showed someone get out of the vehicle, place another person on the ground, and then drive away.
[Ads /]
The man on the ground was identified by police as Duran. He died at the hospital from his gunshot wounds.
The detective said cellular data helped them track the suspects in the SUV to Monmouth Junction, New Jersey.
Then, in the early morning hours of October 13, detectives say the car was set on fire in Cranberry Township. That's where police later recovered the vehicle.
The wife and daughter of Mendez joined Philadelphia police officers in the courtroom on Wednesday.
Family members and friends of the three defendants were also in attendance.
The three defendants are being held. The next court date is set for January 10.