Mr. Goodman, who inherited Mr. Watson’s case from the previous Ferguson prosecutor, did not respond to requests for an interview.

Mr. Watson, who joined the Navy after high school to study cybersecurity, was born in St. Louis. He said he was well aware of the hazards of being an African-American male in St. Louis suburbs like Ferguson, and took care to follow traffic laws and to ensure that his brake lights worked.

His precautions did not help.

On Aug. 1, 2012, after playing basketball with friends in a Ferguson park, Mr. Watson said he walked to his car, where he drank a cold bottle of water and switched on the air conditioner.

A few minutes later, the officer drove toward him and blocked his car with the police cruiser.

“He got out and asked me, ‘Do you know why I pulled you over?’” Mr. Watson said.

Mr. Watson said he was confused, given that his car was parked, although the engine was running. “The second thing he said was, ‘Give me your social security number.’”

Mr. Watson said he did not think it proper for a police officer to demand social security information. “I said, ‘No sir, I can’t do that.’”

The officer, who court records identify as Eddie Boyd III, grew confrontational, Mr. Watson said.

When he asked for the officer’s name and badge number, Mr. Watson said the officer refused.