SAN ANTONIO -- A San Antonio police officer writing out a traffic ticket to a motorist was shot to death in his squad car Sunday by another driver who pulled up from behind, authorities said.

San Antonio police Chief William McManus said the suspect is not known and has not yet been apprehended. A motive is not known.

"This is everyone's worst nightmare," he said.

McManus said the officer had pulled over a vehicle and while he was inside his squad car writing a ticket, a vehicle pulled up behind him. He says the driver of that vehicle got out, walked up to the officer's driver-side window and shot the officer in the head. The man fired a second time, then walked back to his vehicle and drove away, McManus said.

The officer, a 20-year veteran of the force, was pronounced dead at a hospital.

This is the alleged suspect the SAPD are looking for. He was seen at the SAPD earlier in the morning, left the PD minutes later. The SAPD is not giving much information about WHY they believe this is the suspect, what he said in the PD or why he was there.

Investigators believe the gunman who fatally shot a San Antonio police officer was set on targeting anyone in a law enforcement uniform — one of several eerily similar attacks on police this weekend.

On Monday night, authorities arrested the man suspected of shooting and killing San Antonio Detective Benjamin Marconi in his squad car as he was writing a traffic ticket. Hours earlier, the city’s police chief asked for help identifying the shooter and released video that showed the man enter the department’s headquarters several hours before the attack. No officers were inside the lobby of the building at the time the man visited.

The suspected gunman was identified as 31-year-old Otis Tyrone McCain, and Chief McManus said he was the same man who had entered department’s headquarters Sunday morning and spoke briefly with a clerk.

Mr. McCain was pulled over by police officers while driving a car with a woman and small child. Chief McManus said Mr. McCain has an arrest history, but declined to provide details.

(CNN) – A man suspected of killing a San Antonio police detective has offered an apology to the dead officer’s family.

Otis Tyrone McKane, 31, was arrested Monday in the fatal shooting of Detective Benjamin Marconi. Police say Marconi was killed specifically because he was a law enforcement officer.

“I believe that the uniform was targeted,” Police Chief William McManus said at a Monday news conference.

Marconi, 50, was shot at close range Sunday as he wrote a traffic ticket outside of police headquarters. The shooting led to a massive manhunt as police released photos of the suspect, his car and asked the public for help.

McKane was arrested and taken into custody without incident. As he was escorted out of the police department, reporters asked him why he had been upset.

“Society not allowing me to see my son,” McKane replied. “I lashed out at somebody who didn’t deserve it.”

“I’ve been through several custody battles and I was upset at the situation I was in.”

When asked if he had anything to say to Marconi’s family, he replied: “I’m sorry,” as he was escorted away.

Otis Tyrone McKane, the Texas man accused of ambushing and killing a cop, got married Monday after the killing but before his arrest, court records show.

Documents in Bexar County court obtained Tuesday by NBC News show that the judge married the couple right after he or she granted them a marriage license — waiving Texas' 72-hour waiting period. No reason for the waiver was offered by the judge, whose name wasn't recorded.