(Recasts with top winners and speeches)
By Piya Sinha-Roy and Nichola Groom
LOS ANGELES, Jan 29 (Reuters) - "Hidden Figures" was the surprise best film ensemble winner at Sunday's Screen Actors Guild awards, a show overshadowed by politics as stars slammed U.S. President Donald Trump for restricting entry for travelers from seven Muslim-majority nations.
"Hidden Figures," the true story of three black female mathematicians during the 1960s space race, ousted awards front-runners "Manchester By the Sea" and "Moonlight" to claim the night's top prize.
"This story is about what happens when we put our differences aside and we come together," star Taraji P. Henson said.
"Thank you for appreciating these women, they are hidden figures no more," she added.
"Fences," based on August Wilson's award-winning stage play about blue-collar African-Americans, claimed two major acting awards.
With awards darling "La La Land" out of the running for the top SAG prize for best ensemble, the win put "Hidden Figures" firmly into the race for the best picture Oscar, the top accolade in the film industry.
Voted for by about 120,000 U.S. actors, the two-hour televised SAG awards show often anoints top Academy Award winners since actors comprise the largest body within Oscar voters.
A surprised Denzel Washington won best actor for "Fences," beating out front-runners Casey Affleck for "Manchester By the Sea" and Ryan Gosling for "La La Land."
Washington's co-star Viola Davis, who won best supporting actress, thanked the late playwright Wilson for honoring "the average man, who happened to be a man of color."
The SAG awards honored many actors of color in a year when diversity in Hollywood has been in the spotlight. The Academy of Motion Picture Arts and Sciences announced seven Oscar nominees of color among its acting categories this month after two years when only white actors were nominated, prompting the hashtag #OscarsSoWhite.
Politics took center stage at the SAG awards as many stars delivered fiery speeches to directly or indirectly criticize Trump's ban on Muslim travelers.
Julia Louis-Dreyfus, who won best comedy TV actress for playing flawed fictional U.S. President Selina Meyer on HBO's political satire "Veep," called Trump's ban a "blemish."
"Because I love this country, I am horrified by its blemishes, and this immigrant ban is a blemish," she said. "It is un-American."
Mahershala Ali, who won best supporting actor for his role in independent drama "Moonlight," noted that he is the Muslim son of a mother who is a Christian minister.
"She didn't do backflips when I called her to tell her I converted 17 years ago, but I tell you now, we put things to the side," he said.