Elections to a new Northern Ireland Assembly will be held on 7 March next year, the government has said.
Voters will elect a new assembly next March
A transitional assembly, which comes into effect on 24 November until the end of January 2007, has been established until then.
The legislation also requires assembly ministers elected after March's poll to make a pledge of office.
The pledge decrees that they will uphold the rule of law and support policing and the courts.
This requirement was set out in paragraph six of the Saint Andrews Agreement.
Northern Ireland Secretary Peter Hain said the pledge was an integral part of the legislation.
"This bill opens the door for devolved government in Northern Ireland on a permanent basis," he added.
The government had previously given a deadline of 24 November for electing a first and deputy first minister to the assembly and had warned that assembly members' salaries would be stopped if these appointments were not made.
However, under the new legislation assembly members will continue to be paid at the reduced salary rate of £32,000 while the transitional assembly is in operation.
The government has been looking for the DUP and Sinn Fein to indicate who would be taking the first and deputy first minister posts.
However, BBC Northern Ireland political editor Mark Devenport said it was unlikely that the parties would provide a firm answer on this.
"Obviously the prime candidates are Ian Paisley on the one side and Martin McGuinness on the other.
"But the DUP are very insistent that there is going to be no formal designation until after the election on 7 March.
"I guess what we are going to see is yet another fudge where the parties don't really give a very straightforward answer, but the government decides it is enough to move forward."
Meanwhile, Sinn Fein President Gerry Adams has appealed to republicans who are concerned about the pledge of office to view the issue "in the round".
"Clearly any pledge for ministerial position only applies when people are to become ministers and that's not scheduled to happen until March next year," he said.
DUP MP Jeffrey Donaldson welcomed the announcement of elections but said there were still gaps between the parties.
Alliance leader David Ford said the government was playing a dangerous game by holding elections before power-sharing is secured.
"The changes made to the Good Friday Agreement have weakened genuine power-sharing. We face the threat of DUP and Sinn Fein action dissolving the Assembly at will," he said.
The St Andrews Agreement was published after intensive three-day talks between the parties at St Andrews in Scotland.