In this summer of Trayvon Martin and Oscar Grant III — the victim in the film “Fruitvale Station” — I remembered another African-American killed by police gunfire, Oliver Beasley.

Beasley, a member of the Nation of Islam, was shot and killed by a Los Angeles County sheriff’s deputy on Jan. 23, 1990, in what the cops called self-defense, but what Nation of Islam witnesses said was homicide. Martin, of course, was shot to death by George Zimmerman, who was part of a neighborhood watch, in Sanford, Fla., on Feb. 16, 2012. Grant was killed by a Bay Area Rapid Transit officer Jan. 1, 2009, at the Fruitvale station in Oakland near where, coincidentally, my wife Nancy lived as a child and a few miles from where I grew up.

I wrote about Beasley’s death when I was a columnist for the Los Angeles Times. The experience taught me something painful about my own perceptions of ethnic minorities of color.

I had been suspicious of Beasley’s death. Relations between the Nation of Islam and the sheriff’s department, which patrols outside Los Angeles city limits, had been bad. On the night he was killed, two deputies, who were white, saw a car speed by them on 106th Street near Vermont Avenue. The driver was David Hartley, a Nation of Islam member. When the deputies ordered him to stop, he pulled into a driveway next to an apartment house where several Nation of Islam followers lived. Then Hartley headed up to a second-floor apartment.

The deputies got out of their patrol car and about 10 members of the Nation of Islam, including Hartley, came down the stairs. One of the deputies, David Dolson, said Hartley and the others beat him and took away his gun. He said he pulled another gun from his back pocket and fired four times, hitting and wounding Hartley. He said he saw his partner, William Tackaberry, struggling with Beasley for the officer’s gun. Tackaberry shouted, “Kill him, kill him, he’s got my gun.” Dolson shot Beasley in the head.

The Beasley family said that’s not what happened. Family members and Nation of Islam men said Beasley was lying on a strip of grass when he was shot execution style. Felony charges against Hartley — beating and disarming a police officer and resisting arrest — were dropped and he pleaded no contest to misdemeanor assault and was released on unsupervised probation. Probation Officer Yvonne Wilbert said, “There is nothing in the defendant’s history to indicate he is criminalistically oriented.” A department investigation cleared the deputies.

At the time, I tried to learn more. I walked along the street where the apartment was located, but few people would talk to me, a white middle-aged reporter wearing a sport coat. Some young men sitting in front of houses were friendly, but said they didn’t know anything. I called members of the Beasley family and their lawyer, but they wouldn’t talk. I gave up.

About a year later I got a call from a man whose name, James Polidore, sounded familiar. “I’m Oliver Beasley’s brother-in-law,” he said. I reminded him the family wouldn’t talk to me a year ago. He said the family had changed its mind. He invited me to come to the apartment house at 3 p.m. on Jan. 23, the first anniversary of Beasley’s death. Members of the Nation of Islam would lay a wreath at the spot on the grass where Beasley had died. We could talk afterward.

I thought I knew what I was going to see and hear. Beasley, I figured, was another street thug who had been cleaned up by the Nation of Islam, which most journalists and cops referred to as Black Muslims. The Nation of Islam, I assumed, would see me as a white interloper.

That’s not what happened.

About a dozen of the Nation of Islam men walked down the steps, solemn looking, dressed in dark suits, white shirts and bow ties. This is what the sheriff’s deputies probably saw that night. I wondered whether the sight of those unsmiling African-American men on the stairs frightened them or made them think trouble was ahead.

The service began. Standing toward the back, apart from the group, I couldn’t hear much. Instead of rejecting me, one of the Nation members waved me over, and I joined the 24 women, men and children who had formed a half circle around the large wreath of red carnations placed on the grass. “Those who are slain in the way of Allah, they are not dead,” said the man conducting the service.

When the memorial ended, I talked to Polidore, Beasley’s brother Brian and a family friend, Mel Plummer. Twenty-two years later I still remember the sadness and embarrassment I felt about how wrong I had been about Oliver Beasley and the kind of man he was.

“It was unbelievable that Oliver could die like that,” Polidore told me. “You have brothers or sisters, Bill?” he asked. “I’ve got a brother,” I said. “Well,” he said, “you know how it is in family gatherings, there’s always one person who might get in trouble. In our family, the least likely person that you would expect to be in that kind of situation was Oliver. Oliver would be the last person. That’s what makes it so hard.”

I summarized the Beasley family in my column: “The Beasleys are a middle-class family living in Gardena, far from 106th Street. Oliver was a family mainstay, a soft-spoken level-headed man who had served four years in the Air Force after graduating from Gardena High School. Following his discharge, he went to work for the Air Force Reserve at March Air Force Base. He had been attracted to the Nation of Islam by the Muslims’ efforts to improve life in South L.A.”

I wrote, “I hadn’t given the family or the Muslims any sympathy before meeting them because I’d stereotyped them. We live apart in this multiethnic but still predominantly segregated county. We usually work apart too. Ethnic groups see each other on television, in sensational sound bites in times of trouble. That process drains humanity from people, turning them into cardboard caricatures. We’re unable to treat each other as human beings.”

Twenty-two years later, the situation hasn’t changed. Too many people can’t move beyond their stereotypical view of race. Most just exhibit it in their daily lives. A few have a gun in their hands, as happened in the deaths of Trayvon Martin, Oscar Grant and Oliver Beasley. “If this happened to him, it could happen to anyone,” James Polidore, Beasley’s brother-in-law, told me at the time. Just as true now as it was then.