COSTA MESA — For a Vietnamese refugee with a rags-to-riches story, Phu Nguyen thought discussions of ethnicity and immigration would be on his side.

He underestimated the power of the political message.

In the safely Republican 68th Assembly District, the Democratic political newcomer hoped to dominate the Vietnamese vote, and to transcend geographic and ethnic lines.

But he had many obstacles to overcome. Not only was Mansoor the mayor of Costa Mesa and backed by the Orange County Republican establishment, but he also had a clear message: no on illegal immigration.

"He stood for something, and whether you like it or not, that's very powerful in politics," said Fred Smoller, a political science professor at Brandman University, which is part of Chapman University.

During the primaries Mansoor announced that Costa Mesa would not tolerate illegal immigrants. It isn't a "sanctuary city," he proclaimed, but a "rule of law" city.

He also introduced his own measure in 2005 to have Costa Mesa police officers check the immigration status of suspects, long before Arizona passed Senate Bill 1070.

This hardline stance may have helped him carry Costa Mesa, where he won by a margin of 59% to 41%, according to uncertified results.

Voters chose Mansoor by about the same proportion in the parts of the district other than Westminster and Garden Grove, the two most heavily Vietnamese cities.

Ultimately, he won by 55.8% to 44.2%.

In Westminster and Garden Grove, the candidates split the vote: 50.2% for Nguyen and 49.8% for Mansoor.

Nguyen's strong ties to Little Saigon — he was a key organizer for the Tet Festival and active in other groups — certainly boosted him there.

Nguyen says that based on his polling, four out of five Vietnamese voters chose him.

"It wasn't a challenge. The majority of the Vietnamese community voted for me," he said. "We were confident we got that."

But some say he may not have won over the older generation of active Vietnamese voters, who traditionally vote Republican and are especially conservative.

Mansoor and some within Little Saigon criticized Nguyen for his family's business ties to the Communist government in Hanoi. He is vice president of a remittance company that sends millions of dollars to people in Vietnam each year. The anti-Communist strain in Little Saigon is legendary — many immigrants came during or after the Vietnam War and still harbor resentment.

"Folks in the Vietnamese community cannot reconcile the fact that here you have a candidate whose family owns a very successful money transfer company that transmits hundreds of millions to Vietnam," said Assemblyman Van Tran (R-Westminster), who is termed out of the seat that Mansoor will assume.

While Nguyen says his business is treated like any other American company in Vietnam, Tran says some people were convinced of its government connections and remained skeptical.

"How can Nguyen, the candidate, honestly represent the interest of the Vietnamese American community without being compromised by the regime in Hanoi?" he said.

Losing any conservative voters in Westminster, which has a 34% Vietnamese population according to the U.S. Census Bureau, or Garden Grove, which has 23%, would have certainly hurt Nguyen.

Before the election, some speculated that Mansoor's illegal immigration stance could have hurt him in immigrant enclaves, but Nguyen didn't focus on that point because, experts say, it could have backfired.

"Illegal immigration is a message that actually resonates with the Vietnamese community," Smoller said. "They're not necessarily sympathetic with undocumented workers."

Besides messaging and the voter registration deficit — the district is about 32% Democratic and 41% Republican — Nguyen faced the other basic issues that newcomers encounter. He had to overcome Mansoor's name recognition and build his own.

That was a challenge for independent voters, Nguyen said.

"If they didn't receive our message they voted for Allan," he said.

Both Smoller and Tran said that Nguyen didn't have a clear enough message or do enough to build his name identification.

Mansoor also had the highly organized and well-funded Republican Party of Orange County behind him.

Despite the loss, Nguyen said he called Mansoor and offered to help, especially in the Vietnamese community.

"The last thing we need for this community is to be divided," Nguyen said.