(Recasts, adds quotes) By Adrian Croft PLYMOUTH, England, Jan 12 (Reuters) - Prime Minister Tony Blair warned on Friday of a generation-long struggle against militant Islam and said British troops must be prepared to fight wars as well as keep the peace. Blair's speech, given on the Navy assault ship HMS Albion, was clearly intended as a rallying cry to a nation worried about the growing British military death toll in Afghanistan and Iraq. He was also responding to a military that has grown increasingly vocal in its complaints about overstretched forces, inadequate equipment and a lack of funding and support. Blair, who will step down this year after a decade in power, strongly defended Britain's intervention in Afghanistan and Iraq. In militant Islam, the West faced an opponent similar to "revolutionary communism in its early and most militant phase", he said. Retreating in the face of this threat would be a catastrophe because it would strengthen global terrorism, he said. It would also be futile as it would only postpone a confrontation. "The battle will be long. It has taken a generation for this global movement, for the enemy, to grow. It will in all probability take a generation to defeat," he said. It would be easy for Britain to slip quietly into the role of a leader in the fight against climate change and global poverty while leaving fighting wars to others, Blair said. In this scenario, Britain's armed forces could be relegated to peace-keeping and the country's influence reduced, he said. WORLD PROBLEMS But world problems could not be dealt with in isolation and their solution sometimes involved force, Blair said. "So my choice would be for our armed forces to be those that are prepared to engage in this difficult, tough, challenging campaign, for our armed forces to be warfighters as well as peacekeepers," Blair told an invited audience at the Devonport naval base in Plymouth, southwest England. If Britain made that choice it would have to make new commitments, he said. "It will mean increased expenditure on equipment, personnel and the conditions of our armed forces, not in the short run but for the long term." The public had to be prepared for long campaigns and the military had to be prepared to take casualties, he said. Blair has said he will step down this year in part because of public anger over his unswerving support for President George W. Bush's military intervention in Iraq. Britain has around 7,100 troops in southern Iraq and nearly 6,000 fighting the Taliban in Afghanistan. Bush said this week he would send 21,500 more U.S. troops to Iraq to try to restore order to Baghdad, but Britain has no plans to follow suit. The commander of British forces in southern Iraq said last month that British troops had suffered a generation of under-funding and neglect. News reports say almost half the Royal Navy's ships are to be "mothballed" to save money. Blair said Britain planned a "massive" shipbuilding programme, likely to be worth around 14 billion pounds ($27 billion) over the next 10 to 15 years. (Additional reporting by Sophie Walker and Paul Hughes) (Editing by Robert Woodward; sophie.walker1@reuters.com +44 207 542 7947)) ($1=.5170 Pound)