Assemblyman Doug La Malfa holds up a Proposition 22 sign to show his opposition to a same-sex marriage bill. (AP Photo/Rich Pedroncelli)

Governor Arnold Schwarzenegger said he will veto a bill that would allow gay marriages in California.

In pledging to terminate the bill, Schwarzenegger says he's honouring the wishes of California voters.

Schwarzenegger said the legislation, given final approval Tuesday by lawmakers, would conflict with the intent of voters. Five years ago, Californians voted against California recognizing same-sex marriages performed out of the state.

Proposition 22 stated that "only marriage between a man and a woman is valid or recognized in California."

Gay rights advocates were upset with Schwarzenegger because they helped him in his campaign to become governor in 2003. "Clearly he's pandering to an extreme right wing, which was not how he got elected," said Geoff Kors, executive director of Equality California. "He got elected with record numbers of lesbian and gay voters who had not previously voted for a Republican, and he sold us out."

Democrats admitted that the bill was largely a symbolic gesture. They said they did not expect support from Schwarzenegger.

While accepting gay marriage, Schwarzenegger says it's an issue that should be decided by voters or the courts.

The bill would have made California the first state to legalize same-sex marriage through law.

Gay marriages are recognized in Massachusetts but that state's position came through a court ruling.