A judge has ruled that parts of Utah's law banning polygamy are unconstitutional, effectively decriminalizing the practice, in a victory for the family that appears in the reality TV show 'Sister Wives'.

Kody Brown, who stars in the TLC reality show with his four wives, filed a lawsuit against the state after leaving Utah fearing prosecution after the programme aired.

Now a federal judge has issued his final ruling in the case that strikes down parts of the state's anti-polygamy law.

Scroll down for video

Kody Brown poses with his four wives, back Janelle and Christine, front Meri and Robyn, who appear in the TLC reality TV show 'Sister Wives'. A judge has ruled that banning in polygamy in their home state of Utah is unconstitutional

U.S. District Judge Clark Waddoups has ruled that a provision of Utah's law forbidding cohabitation violated the Browns' freedom of religion.

He ruled in favour of the family in December and has now said that Mr Brown and his wives can collect attorneys' fees.

It caps a landmark decision for the family that sued Utah in 2011 after a county prosecutor threatened to charge them following the premiere of the TV show.

The Emmy-nominated series had brought Mr Brown and his wives Meri, Janelle, Christine and Robyn to the attention of the authorities in their home town of Lehi, and police were considering a bigamy charge.

It wasn't immediately clear how much the Browns could collect in attorneys' fees.

Utah Attorney General Sean Reyes said in February he intended to appeal the ruling once it was made final.

Kody Brown, pictured with his children, was threatened with prosecution after the programme aired

On Wednesday, his office said in a written statement that it was reviewing the ruling and 'will make final determination of whether or not to appeal one or more of the issues in the decision within the coming weeks.'

Meanwhile the Brown family attorney Jonathan Turley said they were overwhelmed and thankful for the ruling.

'This was a historic ruling that I believe will stand the test of time,' Mr Turley said.

He added the family would continue the legal battle to an appeals court or even the U.S. Supreme Court if necessary.

The Browns said they were forced to leave Utah for Las Vegas in 2011 in fear of prosecution, however Mr Turley said he didn't know if they would return in the wake of the ruling.

The Browns said they were forced to leave Utah for Las Vegas in 2011 in fear of prosecution but have yet to decide if they will return to Utah

'The important thing is that they now can move back to Utah,' he added explaining that the family has missed the state.

'They now have the choice.'

Fundamentalist Mormon polygamists believe polygamy brings exaltation in heaven. The mainstream Mormon church strictly prohibits the practice.

The bigamy law in Utah is stricter than the laws in 49 other states - most of which prohibit people from having multiple marriage licenses.