WASHINGTON — The Supreme Court on Monday unanimously upheld a Nevada ethics law that governs when lawmakers should refrain from voting on official business because they might have a conflict of interest.

The court reversed a Nevada Supreme Court decision that said elected officials have a constitutional right to vote on official business.

The decision came in the case of Michael Carrigan, a Sparks, Nev., council member who voted on a casino project even though his campaign manager served as a project consultant.

Justice Antonin Scalia, writing for the court, said an elected official’s vote “is not his own speech but a mechanical function of government – the commitment of his apportioned share of the legislature’s power to the passage or defeat of a particular proposal.”

Scalia said rules similar to Nevada’s “have been commonplace for over 200 years.”

The Nevada Commission on Ethics found that Carrigan’s vote violated a provision of the ethics law that lays out various relationships that should disqualify an official from voting, including the official’s relatives and business associates.

The ethics panel said Carrigan should have abstained from voting because his friend and campaign manager, Carlos Vasquez, also worked as a consultant for the Red Hawk Land Co., which was backing the Lazy 8 casino project.