Updated

Attacking a cop or judge in Texas is about to become a hate crime, after state lawmakers sent Gov. Greg Abbott a bill is all but sure to sign – since he was the first to propose it.

The soon-to-be law, inspired by the July 2016 murders of five police officers in Dallas, increases the punishment for crimes against peace officers. It cleared the state Senate this week by a 30-1 vote and already passed the House.

“The men and women in uniform risk their lives every day to protect the public, and it is time we show them the State of Texas has their back,” Abbott said nearly a year ago, after the assassination of five cops working to protect protesters at an anti-police brutality march.

It was the deadliest day for American law enforcement officers since 9/11.

KENTUCKY BECOMES 2ND STATE TO PASS A BLUE LIVES MATTER BILL

The bill now headed for Abbott’s desk says that penalties for threatening peace officers or judges will be raised from a misdemeanor to a felony, punishable by 180 days to two years in prison.  This likens the punishment to offenses based on crimes against groups identified by race, disability, religion, ancestry, age, gender or sexual preference.

Unlawfully restraining or assaulting a police officer or judge would be a second-degree felony, which carries a prison sentence of up to 20 years. Any crime against either group that results in serious bodily injury would be a first-degree felony, punishable by up to 99 years or life in prison.

Judges were added to the bill as an answer to help protect people like Texas District Judge Julie Kocurek, who was shot four times outside her home in Austin in 2015. She survived the attack.

KENTUCKY BECOMES 2ND STATE TO PASS A BLUE LIVES MATTER BILL

If signed by Abbott, as expected, the bill will go into effect on Sept. 1.  The governor did not respond to requests for comment by Fox News, but recently tweeted an article about the bill’s passing, adding #backtheblue.

“I think this legislation is a long time coming in a time when we have basically a war on cops. These bills are needed,” Jim Fotis, president of The National Center for Police Defense, a non-profit dedicated to helping law enforcement officers during difficult times, told Fox News. “Certainly police officers are out there to do their job and they shouldn’t have to worry every single day about somebody targeting them.”

Fotis, however, said he wasn’t sure whether the legislation will be a deterrent.

“Words certainly aren’t going to stop some people, but if you are a sane person, hopefully this will make you think twice before you go after law enforcement,” Fotis said, adding that he thinks this is a good first step but he would like to see broader, federal legislation someday.

FOUR MEN ARRESTED IN ATTACK ON ALABAMA TEEN WHO SAID 'BLUE LIVES MATTER'

The bill, known as the  “Blue Lives Matter Act of 2016" and is similar to the Texas legislation, was proposed in Congress last year but no action has been taken on it.

Critics say that the proposal goes against the intent of a hate came because police officers were not born being cops. And, they say, there are already tough laws in place to prosecute crimes against cops.

“Police are provided many protections already. We arm them and grant them great leeway in use of deadly force. We protect them with body armor and other gear,” said an editorial in the Denver Post published last year. “Rarely do juries or review panels charge officers who kill alleged offenders, but the justice system comes down extra hard when one of its own meets with harm.”

Similar bills are being passed, or at least proposed, in other areas of the country. At least two states, Kentucky and Louisiana, have passed the “Blue Lives Matter” law, which makes attacking a police officer a hate crime.

On May 9, the New York State Senate passed the “Community Heroes Protection Act”  to designate “offenses against law enforcement officers, firefighters and emergency medical services personnel as hate crimes.” And, in Alabama this week, State Rep. John Rogers, a Democrat, asked the Alabama House to do the same.

“It is a hate crime,” Rogers said to WBRC Fox6 in Birmingham, “because it attacks a certain class of individuals: police officers.”