Scottish First Minister Alex Salmond and British Prime Minister David Cameron agree on a vote that could see the biggest British political shake-up in a century.

LONDON — The people of Scotland will decide in 2014 whether to stay yoked to England and Wales or become an independent nation after more than 300 years of sometimes resentful marriage.

With a handshake and their signatures, British Prime Minister David Cameron and Scottish First Minister Alex Salmond sealed a deal Monday on a referendum that could see the biggest political shake-up in the British Isles since Ireland threw off British rule nearly a century ago.

Under the agreement, Scottish voters will get their chance to say yes or no to remaining part of the United Kingdom in a ballot most likely to be held in the autumn of 2014. A decision in favor of secession would end Britain as we know it, dissolving the union of England, Wales and Scotland that has prevailed since 1707 and that once ruled a global empire.

The historic plebiscite is a major victory for Salmond and his Scottish National Party, which won a stunning majority in the Scottish Parliament two years ago and immediately pressed ahead with its pledge to put independence to a popular vote.

An elated Salmond hailed the referendum deal as "a major step forward in Scotland's home-rule journey" and brushed aside accusations that he was bent on scrapping more than three centuries of tradition for the sake of it.

"We're not in the business of ripping things up. We're in the business of developing a new relationship between the people of these islands — I think a more beneficial, an independent, equal relationship," Salmond said in Edinburgh, the Scottish capital.

"I believe we can build an economically prosperous and more just society here in Scotland," he added. "That's going to be the very core of the argument."

But Salmond will have to overcome the strong opposition of union-minded politicians and the skepticism of many of his 5.2 million fellow Scots, who wonder just how well an independent Scotland would hold its own in an increasingly competitive, sometimes dangerous world.

Cameron tried to highlight those concerns by visiting a Scottish shipyard where an aircraft carrier is being built, a showcase of the military might of a unified Britain.

"We are better together, we are stronger together, we are safer together," Cameron said after signing the referendum agreement. "Now the argument can be put. This United Kingdom can never hold a country within it without its consent. We're better off together, but now people will have the choice."

The deal reached between him and Salmond, both canny leaders, entailed concessions on both sides.

Salmond had lobbied for a ballot that offered both independence and a more moderate alternative granting fiscal autonomy for Scotland without a complete breakaway, which could appeal to voters uncertain of taking the ultimate leap. Success for either option would have allowed the Scottish government to expand its powers.

But Cameron, who does not want to go down in history as the prime minister who presided over the breakup of Britain, refused to allow a multiple-choice ballot, preferring a simple thumbs-up or thumbs-down referendum. The prime minister's advisors did, however, give in to Salmond's insistence that 16- and 17-year-olds be allowed to vote, which pro-independence Scots think will slightly boost their chances.

For those yearning for full-fledged nationhood, the referendum is nonetheless a gamble. Virtually no polls have found a majority in Scotland in favor of independence, and a no vote would almost certainly set back the movement at least a generation.

But on the unionist side, no one underestimates Salmond's campaigning skills or his passion, especially not after his party's surprising triumph at the polls two years ago in the face of an electoral system specifically designed to try to prevent any one party from winning a majority in the Scottish Parliament.

"I've always tried to hypothesize on success rather than failure, so let's just leave it at that," Salmond told The Times in an interview last month.

Campaigning can now begin in earnest, with the vote projected for October 2014, which would coincide with the 700th anniversary of the Battle of Bannockburn, a celebrated victory by Scottish fighters over English forces. Both sides will try to enlist big names to their cause — tennis player Andy Murray on the pro-independence side and Harry Potter author J.K. Rowling for the unionists.