LONDON (Reuters) - The British government said on Wednesday it would commit to NATO’s defence spending pledge of two percent of GDP for the next five years, a decision which will help ease U.S. fears about their future ability to rely on a close military ally.

The United States immediately welcomed the pledge and urged all NATO members to do the same.

Britain has reduced defence spending by about 8 percent in real terms since 2010 to help cut a record budget deficit, shrinking the size of the armed forces by around one sixth.

The government has repeatedly come under pressure from lawmakers both in its own Conservatives and the opposition Labour Party to commit to the NATO target but had declined to do so beyond the current financial year, saying it would depend on the outcome of a defence review currently under way.

Several top U.S. military figures, including U.S. Army Chief of Staff General Raymond Odierno, had also expressed concern about declining defence spending by Britain, which still spends more on defence than any other European NATO member.

British finance minister George Osborne told parliament during his budget statement on Wednesday that the government was “not prepared to see the threats we face to both our country and our values go unchallenged.”

“So today I commit additional resources to the defence and security of the realm... committing today to meet the NATO pledge to spend 2 percent of our national income on defence, not just this year, but every year of this decade.”

Osborne also said the government would guarantee a real increase in the defence budget every year. A Treasury aide said the defence budget would reach 47.7 billion pounds ($73.18 billion) a year by 2020.

U.S. State Department spokesman Mark Toner said the United States appreciated the leadership shown by “one of our greatest friends and our strongest allies” and added:

“We strongly urge all NATO allies to do the same, and it’s critically important that NATO be able to respond effectively to existing and future threats, and the only way to do that is for allies to make the necessary investment in their armed forces.”

Last month NATO said it expected military spending by the 28 members of its alliance to fall this year in real terms despite increased tensions with Russia and a pledge by leaders last year to halt falls in defence budgets.

It expects five NATO allies, including Britain, to meet the 2 percent spending goal in 2015, up from four in 2014.

Shares of BAE Systems BAES.L, Britain's biggest defence contractor, traded up 3 percent on the day, making the company one of the top risers on Britain's bluechip index.