The state Supreme Court turned down a discrimination claim Wednesday by a veteran San Francisco police officer who lost his job after suffering a heart attack.

Kenneth Lui, an officer since 1981, was stricken in December 2005. He took 11 months of disability leave with full pay, then was given a job in the police records room for a year, the maximum allowed by Police Department policy.

Lui retired in April 2008. He argued in his suit that the department should have accommodated his disability by providing him a permanent administrative job.

A Superior Court judge dismissed the suit, a decision that was upheld in December by the First District Court of Appeal, which said the department was entitled to require all officers to be able to perform strenuous work in the event of an emergency or mass mobilization.

San Francisco had eliminated permanent light-duty assignments for disabled officers in 2004. The court noted that the city had to mobilize all officers for about a week after the 1989 Loma Prieta earthquake, and did so again during the 2003 Iraq war protests and the 2008 Beijing Olympics torch run.

Such duties are not commonplace for desk officers but are "essential functions of the job," Justice Mark Simons said in the 3-0 appellate ruling.

Lui's lawyer, Lawrence Murray, argued that the ruling and department policy would send a message to other San Francisco officers to avoid risks. The state's high court unanimously denied review of the case Wednesday.