A bill to give the Welsh assembly new powers has become law after opposition parties in the House of Lords withdrew their opposition.
The end of the standoff between the Lords and the Commons meant the Government of Wales Bill received its Royal Assent on Tuesday evening.
Changes to the assembly's structure and electoral system will be in place by next May's elections.
The bill allows AMs to make their own laws without going through Parliament.
First Minister Rhodri Morgan described the bill as a "very significant increase in powers" and said it would result in a much "meatier contest" at the next election.
"The four parties can draw up manifestos on the basis of what legislation they promise to pass if elected," he said.
"It means a much meatier contest because you'll have much meatier manifestos with more real chances in front of you."
The assent was announced in a brief statement in the House of Lords by a parliamentary clerk.
The bill would also prevent a "hostile" Welsh secretary in Westminster blocking the transfer of legislation to the assembly, the first minister added.
"This is to prepare for the day when we don't have the same parties in power in Cardiff as in Westminster."
Welsh Secretary Peter Hain described it as a "fantastically exciting day".
He said: "It will settle the constitutional argument on the future of Wales if not forever then for generations to come.
"In this bill is the prospect of full law-making powers, Scottish style, if a referendum is triggered to produce it.
"More and more decisions will come down to the assembly."
Instead of waiting for full bills to be drawn up in parliament, AMs will be able to make their own legislation - to be known as assembly measures - in areas it holds responsibility for.
There is also provision for an eventual move to full law-making powers, but only following a referendum.
The bill has been controversial, and opposition peers had altered several key parts in a series of defeats for the government.
Most controversial had been a proposed ban that would prevent candidates standing in both regional and constituency seats in assembly elections.
Critics said it was unfair and designed to make life harder for the opposition parties.
But the government insisted that the ban was a manifesto commitment and refused to back down.
There had been other changes imposed by the Lords on the political balance of the assembly's committees and the body which will run the institution in future, the Assembly Commission.
Peers changed the bill to include a name-change for the proposed Audit Committee, and to limit the secretary of state's role in any referendum on full law-making powers.
The government compromised on the committees and the commission and reassured peers that the bill was not intended to give a future Welsh secretary power to veto the assembly.
Liberal Democrat peer Lord Livsey of Talgarth said: "This bill will not give Wales the powers it needs or deserves."
Plaid Cymru leader Ieuan Wyn Jones said: "The secretary of state will still have an absolute veto over the assembly's proposals which will make things very difficult when there are two different parties in power in Westminster and Cardiff."
And Shadow Welsh secretary Cheryl Gillan said: "The Government of Wales Bill was a missed opportunity for all political parties to work together in the best interests of the assembly and the people it serves."