Updated

British Prime Minister David Cameron and his Tory party's decisive victory in parliamentary elections likely has President Obama breathing a sigh of relief, with analysts saying the win virtually ensures the continuation of vital U.K. support in fighting the Islamic State and other security matters.

"You need to have a very strong, robust Britain on the world stage," said Nile Gardiner, director of the Margaret Thatcher Center for Freedom with the Heritage Foundation. "I think it's very important that the United States has alongside it a leader who is willing to take on and fight against the Islamist extremists."

Cameron's party defied the polls, which predicted a tight race that could leave the balance of power in Britain's Parliament up in the air. There had been a distinct possibility that, with nobody winning a clear majority, the center-left Labour Party would be able to cobble together a coalition with other parties not so hawkish on military matters as Cameron and the Conservatives.

Instead, Cameron's Conservative Party won an unexpected majority. After meeting with Queen Elizabeth II on Friday afternoon, Cameron returned to his office to announce he would form a majority Conservative government.

Obama may actually have more in common with Labour's Ed Miliband, both of them left-leaning politicians. Yet while Cameron is more fiscally conservative than Obama on many fronts, Obama and Cameron have nevertheless developed a close alliance, even a friendship, in addressing their shared challenges. Their two governments are cooperating in ongoing nuclear talks with Iran and, importantly, in the international fight against Islamic terrorism.

More On This...

    Pollster and Fox News contributor Frank Luntz, in London, said Cameron is now the "undisputed leader."

    "It's very important for U.S. foreign policy," he said. "This will continue Britain's support for what the U.S. is doing to challenge ISIS, support for Israel. It's a very significant win for the U.S., and it's a very significant win for people who are right of center in Europe and America."

    Cameron is known for taking a hard line against Islamic radicalism, speaking more bluntly about the challenge than Obama. Gardiner noted that, "he clearly identifies the nature of the Islamist threat, in contrast to President Obama." Gardiner said, "He believes we are engaged in a global war with Islamist extremism."

    Despite the rhetorical differences in Obama and Cameron's approaches, the two countries have been key partners in airstrikes against ISIS over Iraq, with the U.K. one of the biggest contributors. The U.K. has contributed to surveillance missions as well.

    In a statement on Friday, Obama congratulated Cameron on his "impressive electoral victory" and cited their strong working relationship. "I look forward to continuing to strengthen the bonds between our countries, as we work together on behalf of global peace, security and prosperity," he said.

    One potential trouble-spot is that the Conservatives have promised a referendum on leaving the European Union, which could be problematic for the United States.

    In a political sideshow of the election, it also involved former Obama advisers working on different sides. Ex-campaign manager Jim Messina worked for Cameron, while ex-adviser David Axelrod worked for Miliband.

    After the results came in, Cameron promised to govern as the party of "one nation, one United Kingdom."

    With the Conservatives winning an outright majority in the 650-seat House of Commons, the election result looked to be far better for him than even his own party had foreseen. With 643 constituencies counted, the Conservatives had 326 seats to Labour's 230.

    The prime minister beamed early Friday as he was announced the winner of his Witney constituency in southern England.

    "This is clearly a very strong night for the Conservative Party," he said.

    Cameron, who would be the first Conservative prime minister to win a second term since Margaret Thatcher, vowed to counter the rise of Scottish nationalism with more powers for Scotland and Wales.

    "I want my party, and I hope a government that I would like to lead, to reclaim a mantle that we should never have lost -- the mantle of one nation, one United Kingdom," he said.

    Labour was routed in Scotland by the Scottish National Party, which took almost all of the 59 seats. SNP leader Nicola Sturgeon told the BBC that the vote represented "a clear voice for an end to austerity, better public services and more progressive politics at Westminster."

    Britain's economy -- recovering after years of turmoil that followed the 2008 financial crisis -- was at the core of many voters' concerns. The results suggest that many heeded Cameron's entreaties to back the Conservatives as the party of financial stability.

    The Associated Press contributed to this report.