A legal battle between law enforcement in Ontario and tech-giant Facebook that would have changed how the courts access private messages allegedly used in crime has come to an abrupt end.

Crown attorneys in London, Ont. were fighting for access to texts sent on Facebook Messenger, as part of evidence in a homicide investigation and trial.

All along, Facebook had said it was not bound by Canadian law and this case would have challenged that argument.

Because Facebook is an American company, the usual legal process involves Canadian authorities applying for evidence, in this case from the Facebook Messenger app, through a mutual legal assistance treaty (MLAT). The treaty has been used for decades by police on both sides of the border to get access to physical evidence.

In this case, a judge issued a production order — essentially a legal order for Facebook to give up the information. Authorities thought that would be quicker than the treaty process, which takes about four months.

But when it became clear this fall Facebook would fight tooth and nail against having to comply with a Canadian judge's order, the Crown applied through the MLAT for the messages and received them.

Today, in a Windsor court, the case to force Facebook to comply with the production order was effectively dismissed.

Facebook Inc.'s lawyers had argued an American company cannot legally comply with a Canadian judge's orders, whether it was a Superior Court of Justice ruling or one made by the Supreme Court of Canada.

Now that the Crown has possession of the Facebook Messenger messages, the homicide trial can proceed.

The case at issue is the killing of Raymond Beaver in 2017. Several people are charged in the case.