Spurred on by angry stepmom Barbra Streisand, “Gangster Squad” star Josh Brolin entered rehab to kick booze and save his marriage, sources say.

The 45-year-old actor – whose wife, actress Diane Lane, filed for divorce in February – checked into a Northern California facility on Nov. 15. Sources say the “True Grit” hunk finally recognized he needed help after getting into a shouting match with a cab driver and a boozy scuffle with a bar bouncer on the same night.

Adding to Brolin’s woes, his bad-boy behavior was caught on video and posted on the Internet. “Josh finally admitted he wasn’t going to live long like this,” said a friend.

“He’s had a series of arrests and misadventures tied to his drinking, and his life has fallen apart as a result. “He really seems to want to get better, which is the first step.”

As The ENQUIRER has reported, Brolin’s liquored-up antics with a cab driver in the drive-thru of a Hollywood fast food joint and a bouncer at a Santa Monica bar on Nov. 1 sparked a war between his father James Brolin and wife Barbra.

“Barbra told James if he was any kind of father, he would take action immediately, that Josh is an embarrassment and a danger to himself and others,” said a source. “Josh doesn’t have any lost love for Barbra, but he felt badly that his problems were causing trouble for his dad.

And as much as he hated to admit Barbra was right, he realized he needs help.”

Josh was once the toast of Hollywood – with a Best Supporting Actor Oscar nomination for the 2008 biopic “Milk” along with praise for his role as President George W. Bush in “W,” and work in the 2007 drama “No Country for Old Men.”

But the hard-drinking “Men in Black 3” star has also suffered repeated brushes with the law, including being detained for public intoxication in Santa Monica on New Year’s Day and a bust after a barroom brawl in Louisiana in 2008, although charges were ultimately dropped.

The divorce from “Secretariat” star Lane has yet to be finalized, and sources say Brolin – who has two children from his first marriage – hopes his rehab stint will save their eight-year union.

“Diane believed
 Josh’s boozing was
a big detriment to
their happiness, and she finally had to call it quits,” the friend said.

“Josh hopes he can show Diane he’s a changed man and convince her to call off the divorce. “The guy has been on a down- hill slide for years.

He’s finally ready to get help, but only time will tell if Josh will really be able to straighten out his life.”