A “known gang member” with a history of arrests for drugs and violence who had recently been released from jail has been identified as the suspect who fatally shot a Whittier police officer and wounded a second officer during a shootout following a traffic crash, police say.

Michael Mejia, 26, was also shot but survived. Police said Mejia had previously killed his cousin in a separate shooting in East Los Angeles, just hours before the attack on Whittier officers, the Los Angeles Times reports.

Officer Keith Boyer was killed, and his partner, Officer Patrick Hazell, was wounded in the shooting Monday in the California city. Hazel was in stable condition Monday night.

Boyer, a 27-year veteran of the department, was the first officer killed in the line of duty in Whittier since the late 1970s and only the third to be fatally shot in its 100-year history.

Boyer and Hazel were responding to a routine traffic call in the Los Angeles County city when the suspect pulled a gun and opened fire, police said.

“It’s extremely tragic,” Los Angeles County Sheriff’s Lieutenant John Corina told reporters. “You’ve got a couple officers who just responded to a traffic accident, and they think they’re there to help out people involved in a traffic accident. Next thing they know, they got this guy shooting at them. He shoots both of them and kills one of them.”

Here’s what you need to know:

1. Mejia Is Accused of Fatally Shooting His Cousin in East Los Angeles Before Stealing His Car

Whittier Police Officer Killed, Another Hospitalized Following Shootout With SuspectA Whittier police officer was killed and a second officer was wounded in a shootout with a suspect Monday, authorities said. Dave Lopez reports. 2017-02-21T01:22:01.000Z

Michael Christopher Mejia is also accused of killing his cousin in East Los Angeles earlier Monday. Family members of the suspect’s cousin, 47-year-old Roy Torres, said they possibly had an argument about a girlfriend before the shooting. The suspect is a distant cousin of Torres, family said.

DEVELOPING: Family says 47-year old Roy Torres was killed by his cousin-same suspect who killed Whittier officer hours later. @FOXLA pic.twitter.com/rxaV6S2Nsl — Stephanie Stanton (@Newzysteph) February 21, 2017

After the shooting, Mejia stole a car from his cousin and fled from the scene of that crime, according to police. He crashed into two cars about 8 a.m. Monday in Whittier. Police were responding to that crash when Officer Keith Boyer was shot by the suspect, authorities said.

2. The Tattoo-Covered ‘Gang Member’ Was Being Patted Down When He Pulled a Gun From His Waistband & Opened Fire

Police said Michael Mejia was wearing “gang attire” and had tattoos on his face and neck, but the responding officers did not know he was driving a stolen car. Authorities said Officer Boyer and Officer Hazel also did not know the suspect was connected to an earlier shooting in Los Angeles.

“When they get him out of the car, they go to pat him down for weapons, they can see he’s got tattoos all over his face and all over his neck,” Los Angeles County Sheriff’s Department Lieutenant John Corina said. He then pulled out a semi-automatic handgun from his waistband and began firing, police said.

“He started firing at the officers and they returned fire,” Corina said. “We are still looking into that, why he just opened fire. It seems like a simple traffic accident and next thing they know they’re in a gunfight. You never know when you respond to a call, what you are going to run into.”

3. He Was Released From Jail Just 10 Days Before the Shootings & Has Convictions for Robbery & Grand Theft Auto

EMOTIONAL: Body of Whittier Officer Who Was Shot and Killed Transported in Orange County (FNN)Brought to you by Desert Diamond: http://ddcaz.com 2017-02-20T21:51:46.000Z

Mejia was released from prison just 10 days before the shootings, the Los Angeles County Sheriff’s Office said.

A parole check had recently been conducted at his home, KABC-TV reports.

Mejia has a record that includes a 2010 robbery conviction and a 2014 conviction for grand theft auto, the Los Angeles Times reports. He was sentenced to four years in prison for the 2010 robbery conviction and two years in prison in 2014. He was released from prison in April 2016.

He has been in and out of jail several times since July 2016 for probation violations, the Times reports. He spent 10 days in jail in July. He was then arrested again in September. It is not clear how long he spent in jail for that violation.

Mejia was then arrested again in January for violating his probation and sentenced to 40 days in jail, but was released after spending just 10 days behind bars. On February 2 he was arrested by deputies from the Los Angeles Sheriff’s Office for violating the terms of his release. He was given “flash incarceration” and released after 10 days on February 11.

Then, less than 10 days after that stint in jail, he shot his cousin, stole his car and killed the Whittier police officer, police said.

Details of the violations were not immediately available, but Los Angeles County Sheriff’s Office Lieutenant John Corina told him they “were all different incidents.”

4. The Whittier Police Chief Criticized Laws That Lead to the Early Release of Prisoners

Whittier Police Chief John Piper said at a press conference that the suspect was released from custody early and put blame on a set of new laws aimed at reducing incarcerations in California, according to the Times.

“We need to wake up. Enough is enough. You’re passing these propositions, you’re creating these laws that are raising crimes. It’s not good for our communities and it’s not good for our officers,” Piper said. “We need to pull our head out of the sand and realize what we are doing to our community and to our officers.”

According to the Whittier Daily News, Piper was referring to AB 109, a state law mandating early prison releases, and Proposition 47, which turned some felony offenses to misdemeanors. AB 109 was signd into law by Governor Jerry Brown in 2011 and voters approved Proposition 47 in 2014.

According to the Whittier Daily News, Michael Mejia was on probation under AB 109, which mandates early prison releases for nonviolent offenders. He was released from state prison in April 2016.

The law also requires “flash incarceration,” for parole violations, which are usually 10 day jail stints. Mejia was arrested on those flash holds at least five times since his release from prison.

“You have no idea how it’s changed in the last four years. We have statistics to show it,” Piper said. He told reporters that in recent years, the highest number of calls for service have been for resisting arrest on officers. He said he had never seen that before in his 25 years in law enforcement.

“This is a senseless tragedy that did not need to happen,” Piper said.

“It’s really hard for me to hold back my tears because all of us have been grieving since 10 this morning and I didn’t think I had any tears left,” Piper said. “But everyone needs to know what these officers are dealing with on a daily basis, you have no idea how it has changed in the last four years.”

Los Angeles County Sheriff Jim McDonnell told the Los Angeles Times the law changes have led to the release of too many criminals without a proper safety net of mental health, drug rehabilitation and other services.

“We’re putting people back on the street that aren’t ready to be back on the street,” McDonnell said. He said the county jail he runs has become the “default state prison.”

5. Boyer Was Remembered as the ‘Best of the Best’ Who Was a ‘Loving Father, Goofy, Talented & Brave’

Whittier Police Chief Jeff Piper called Boyer “the best of the best,” at a press conference announcing his death. “He was a personal friend of mine for over 25 years,” Piper told reporters.

Boyer joined the department in 1989. He worked as a dispatcher, jailer and reserve officer before moving to patrol, KTLA-TV reports.

Boyer played drums in a community band that performs for charity, the Los Angeles Times reports.

“He was genuinely the nicest guy you’d ever want to meet and he had a great joy of performing music and bringing smiles to people,” Jeff McNeal, the lead vocalist and founder of the Temecula rock band Mrs. Jones’ Revenge, told the Whittier Daily News. “He was proud of the work that he did and we were proud of the work that he did both on and off the stage.”

McNeal told the newspaper Boyer was a lifelong Whittier resident and the two met a few years ago through a mutual friend when McNeal’s band needed a drummer.

“He was an exceptional musician,” McNeal said. “When he joined our band, he elevated us to a new level that wouldn’t have been possible. His skill was such that we were able to play more challenging, more difficult songs.”

In a touching post on her Facebook page, Boyer’s daughter-in-law, Meagan, paid tribute to the fallen officer:

My father-in-law is a hero. Today will leave a wound in my family that is indescribable. However, I don’t wish to make a sad post. I want to tell the world who Keith Boyer really was. This man was a loving father, goofy, talented, and brave. He welcomed me into his family from day one. He believed in what he did. He wanted to make the world a better, safer place. I never heard one racial slur come from his mouth. He was an incredibly kind and loving man. He played the drums like a boss. The world lost an incredible man today, but God’s band gained an incredible drummer! Greater love hath no man than this, that a man lay down his life for his friends. John 15:13

According to Whittier Police Chief Jeff Piper, Boyer had recently talked about retiring. He was a mentor to younger officers.

“He was respected for his many years of experience and younger officers looked to him for advice and guidance,” Piper said.