NEW WESTMINSTER, B.C. -- A Vancouver-area police officer has been charged with second-degree murder in connection with a fatal standoff outside a casino two years ago.

B.C.'s criminal justice branch said Const. Jordan MacWilliams is charged in the death of Mehrdad Bayrami, 48, who was shot in November 2012. MacWilliams, who works for the police force in Delta, south of Vancouver, appeared in court Monday and was released on bail.

Police were called to the Starlight Casino, located in nearby New Westminster, on Nov. 8, 2012, after the reports that shots had been fired in the parking lot.

Police blocked off the area, including closing a major commuter bridge, and spent several hours attempting to negotiate an end to the standoff. Patrons in the casino were ordered to stay inside.

By the day's end, the province's Independent Investigations Office, which handles serious cases involving police officers, announced a suspect had been shot. Bayrami later died in hospital.

Neither police nor the Independent Investigations Office has said what prompted the shooting.

The Independent Investigations Office forwarded a report to Crown counsel in July of last year, though prosecutors subsequently requested more information, which they received this past July and earlier this month.

Delta police issued a written statement that said the force's "thoughts are with Mr. Bayrami's family."

In the statement, Delta police Chief Jim Cessford said he respects the roles of Crown and the independent investigators.

"This incident occurred almost two years ago and, given the independent nature of the investigation, I have limited knowledge of the details regarding this matter," the statement said.

"Also, considering the fact that this matter is now before the courts, I am not in a position to make any comment relative to the charges against Const. MacWilliams."

The criminal justice branch said MacWilliams is now out on bail, subject to a list of conditions.

His next appearance is scheduled for Dec. 18.