WINNIPEG -- A Manitoba law that forbade members of the legislature from switching party caucuses -- an action commonly called floor-crossing -- did not violate the Charter of Rights, a Court of Queen's Bench judge ruled Tuesday.

Justice Sheldon Lanchbery rejected a lawsuit brought by Independent legislature member Steven Fletcher, who was kicked out of the governing Progressive Conservative caucus last year.

Under a law introduced by the former NDP government in 2006 and lifted earlier this month by the Tories, Fletcher had to either remain an Independent until the next election, or resign his seat and run in a byelection under another party's banner.

Fletcher's lawyer argued the law, which was the only one of its kind in Canada at the time, violated Fletcher's freedoms of expression and association under the Charter.

But Lanchbery ruled that legislatures have the right to set their own rules, and the courts should not interfere.

"Although (the floor-crossing ban) may be bad public policy, courts should not become the adjudicator of legislation or policy that is within the sole purview of the legislature," Lanchbery wrote.

"This is the very nature of parliamentary privilege. If a court were to do so, it would trample on the constitutionally protected separation of powers."

Lanchbery also ruled that Fletcher continues to enjoy the rights of a legislature member in terms of representing his constituents and speaking in the chamber. He added an Independent member may arguably have more freedom in the legislature than a caucus member.

"He is not governed by the historical role of the party whip who determines who may speak on behalf of a political party on any issue before the legislature."

While the Tory government agreed last year to lift the ban -- and passed the required amendment earlier this month -- the government fought Fletcher in court on the principle of parliamentary privilege.

Fletcher said Tuesday he considers his case a win anyway, because he forced the government to change the law.

"The fact in the end is the government agreed ... and we have freedom in Manitoba that was denied up until recently."

The ruling means, however, that a future government could bring in a similar ban.

While Fletcher now has the right to join another party, he has said he was fighting the law on principle only. He has made no sign of joining either of the opposition parties.