SALT LAKE CITY (AP) — A legal opinion released by the Utah Attorney General's Office says that the governor's setting special election last year to replace Jason Chaffetz in Congress was legal.

The opinion released by Sean Reyes' office Tuesday followed months of dispute by legislators and the governor's office over the opinion.

Legislators last year had questioned whether Gov. Gary Herbert overstepped his power when he set the election timing and process for last year's special election rather than letting legislators weigh in and set the process.

Reyes' office drafted a legal opinion about the governor's powers at lawmakers request but Herbert's office blocked the release, claiming attorney-client privilege.

Lawmakers had threatened to sue for the opinion but Reyes released it after the governor waived the privilege in a joint letter with legislative leaders.