SANTA ANA — A retired Los Angeles Superior Court judge pleaded no contest today to a single count of assault with a firearm for firing a shot at police officers during a standoff at his West Los Angeles home and was sentenced to 500 hours of community service and five years of formal probation.

The case against James Bascue, 75, was being handled in Orange County because all of the judges in Los Angeles County had to recuse themselves. Bascue left the Los Angeles Superior Court bench about eight years ago.

The case was prosecuted by the state Attorney General’s Office.

Orange County Superior Court Judge Thomas Goethals, who presided over the case, ordered Bascue to continue wearing a bracelet for another year that records if the defendant has had any alcohol or drugs and to get rid of his guns, which he already has done.

If Bascue fails to complete his community service or violates any terms of his probation he could face up to four years in prison.

He is due back in court July 8 for a “progress report” hearing from probation officials.

Goethals also ordered Bascue to not drive anymore, which is something the judge had already given up.

Goethals said he decided against ordering Bascue to do time behind bars because he deserves credit for his extensive background as a public servant, which also might make the defendant vulnerable to the “many enemies” he might have accrued over the years as a law enforcement authority.

Goethals, however, was mindful of the “perception” that Bascue might be getting a break because of his standing in the legal community.

“It’s important to me and this community there not be a perception we have a two-tiered system of justice,” Goethals said.

Goethals made a point of addressing Bascue with the title of “mister” instead of judge so as not to indicate special “deference” to the defendant.

Goethals referred to Bascue’s “unbreakable chain of high level of service” in his career in law enforcement. That, however, should not “lessen the seriousness of what happened in your home last June,” Goethals said.

Goethals did not refer to retired Los Angeles Superior Court Judge Lance Ito by name, but he dropped enough hints to make it clear he was referring to the judge who presided over the “trial of the century,” as the source of one of the more compelling letters of support for Bascue.

Ito made it clear in the letter that alcohol “took over” Bascue’s “life,” Goethals said.

Bascue “steered that (Los Angeles Superior) court system through many difficult years,” Goethals said.

Bascue’s plea “does not undo” his career accomplishments, “but it does impact your legacy unfortunately,” Goethals said.

Goethals said he also was moved by the letter of apology Bascue penned to the Los Angeles police officers who responded to the standoff at the judge’s home. Goethals added that publicity about the case provided its own form of punishment in “shame and embarrassment” to Bascue.

Bascue twice sought alcohol abuse treatment before the conflict with police and failed, but he has been sober since his arrest, Goethals noted.

Bascue choked up as Goethals spoke of the judge’s career, prompting one of the defendant’s attorneys to fetch him a tissue.

Deputy Attorney General Zee Rodriguez said her office took into consideration the judge’s age and health as well as his “significant contributions to the criminal justice system” in the plea deal offer.

“He has shown a great deal of remorse,” Rodriguez said.

Bascue does not have the option to have the felony conviction knocked down to a misdemeanor or expunged, Goethals said.

Bascue did not speak much during the proceeding, but at the end he rose and told Goethals, “With great respect and thanks, your honor.”

Bascue’s attorney, Richard Hirsch, said his client has “taken substantial steps to deal with” his alcohol “problem.”

Another of Bascue’s attorneys, Michael D. Nasatir, said the judge wants to focus “the rest of his life on serving the community.” Bascue plans to do his community service working for organizations that helps the homeless and veterans, Hirsch said.

According to police, Bascue called authorities around 11:45 p.m. June 10 and claimed he was being held hostage. When police arrived and looked through a window of the townhouse in the 1900 block of South Barrington Avenue, they saw Bascue sitting on a couch with two guns.

When officers tried to make contact with him, he began loading magazines and a gun, police said. At one point he pointed a gun at his head. Police said a shot was fired inside the home, and another through the window toward officers. No officers were hurt.

In addition to drinking, Bascue was also under the influence of Ambien, a sleep aid, his attorneys said.

Bascue also must refrain from taking that type of drug as well during his probation.

As SWAT officers were being called, the suspect contacted a neighbor, who talked him into walking out of the residence, according to police. No one else was in the residence at the time of the standoff, and no other suspects were found.

Bascue retired in June 2007 after reaching the maximum retirement age of 67.

Bascue, who earned his law degree from UC Davis, was a Los Angeles County deputy district attorney from 1971 to 1990, serving as chief deputy from 1983 to 1985 under then-District Attorney Robert Philibosian.

In 1990, Bascue was appointed to the bench by then-Gov. George Deukmejian, and he was elected assistant presiding judge in 1999.

Bascue served as presiding judge from 2001-02, and received the Judicial Council of California’ Jurist of the Year award in 2002.