CLICK HERE if you are having trouble viewing these photos on a mobile device

This awards stuff is getting to be a habit for Mahershala Ali.

Ali, who was born in Oakland, raised in Hayward and did his college studies at Saint Mary’s College, scored his second Academy Awards nomination in three years on Tuesday for his supporting performance in “Green Book.”

Ali figures to be the favorite going into the Feb. 24 Oscars ceremony as he already picked up a Golden Globe for the role. In 2017, he won in the same category for his portrayal of a soft-hearted drug dealer in “Moonlight.”

In “Green Book,” which is based on a true story, he plays world-renowned pianist Dr. Don Shirley, who hires a coarse, Italian-American bouncer named Tony “Lip” Vallelonga (Viggo Mortensen) to be his driver for a concert tour through the Jim Crow South in 1962.

“Green Book” also garnered major nominations for best picture, lead actor (Mortensen) and original screenplay, despite a rash of controversies that some believed might derail its Oscar hopes.

Days after scoring major victories at the Golden Globes, director and co-screenwriter Peter Farrelly had to apologize for exposing himself on the set of his 1990s films, and producer and co-screenwriter Nick Vallelonga deleted his Twitter account after a 2015 tweet supporting Donald Trump’s claim that Muslims in New Jersey celebrated the 9/11 terrorist attacks resurfaced.

And before that, there was more turbulence. Mortensen used the N-word during a post-screening Q&A session last year and later apologized. “Green Book” also faced criticism after relatives of Don Shirley claimed that Ali’s character was depicted inaccurately and that the family was never consulted during production.

When Ali won the Golden Globe, he made sure to acknowledge Shirley in his acceptance speech.

“Dr. Shirley was a brilliant man,” he said. “I just want to thank him for his passion and his virtuosity, and the dignity he carried himself with. That inspired me each and every day.”

In an interview with the Bay Area News Group last fall, Ali said that the regal and erudite Shirley was so vastly different from any character he had ever played that the role initially “scared” him. But that’s how he knew he must take it on.

“For me, it’s important to have some element of fear when I read a script,” he said. “That’s what wakes me up. That’s what excites me and makes it worth doing. I want that challenge. When I read a script and find myself thinking, ‘Oh yeah, I could do that,’ I know it’s not the thing to do.”

Ali’s competition in the Best Supporting Actor race includes another Bay Area native, Sam Rockwell, who was nominated for playing President George W. Bush in “Vice.” Rockwell was born in Daly City and raised in San Francisco, where he attended the Ruth Asawa School of the Arts.

Others up for the award include Sam Elliott (“A Star is Born”), Adam Driver (“BlacKkKlansman”) and Richard E. Grant (“Can You Ever Forgive Me?”).