Police Chief William McManus said the officer's body camera footage did not have any audio but showed him pulling over a truck with three people inside around 11:30 a.m. for an unknown reason.
As he was having a "casual" conversation with the male driver, the driver pulled out a gun and began firing, he said.
"It was a very casual conversation from its appearance," McManus told reporters.
The officer, who has been with the department for five years, was struck once in the hand and returned fire as he was backing up, the police chief said. The driver and a male passenger were hit and pronounced dead at the scene. They were described as being in their 20s.
A female passenger was shot in the chest and taken to a hospital. Her condition was not immediately known.
McManus said multiple shots were fired from the truck. At one point, the officer reloaded his weapon after the firearm had a malfunction, he said.
Friday's shooting came a day after another San Antonio police officer killed a gunman at a parking garage outside the San Antonio International Airport. The shooter was confronted by an officer and allegedly opened fire before being killed.