"We're not quite staring down the barrel, but the pattern is clear," Cameron told a joint session of Parliament.
Cameron, fresh from a speech at the United Nations, lauded Canada's economic record saying this country " in the last few years, has got every major decision right," as Harper looked on in satisfaction.
But he said the rest of the world is awash in debt.
"This is not a traditional, cyclical recession, it’s a debt crisis," said the Conservative leader of Britain's coalition government.
SUBSCRIBE AND FOLLOW
Get top stories and blog posts emailed to me each day. Newsletters may offer personalized content or advertisements. Learn more
"It is not simply a question of using conventional fiscal and monetary levers to stimulate growth until confidence and normal economic activity returns."
Cameron made an impassioned plea for countries to work together on freer global trade as one solution to the impasse.
Harper, speaking just before Cameron, told the House that the biggest test facing the G20 is avoiding the "devastating consequences" of a return to a global recession.
"Without key countries taking systemically appropriate and coordinated economic measures, without resistance to protectionism and acceptance of more flexible exchange rates, without fiscal consolidation, without a commitment by governments to cut rising deficits and reduce what are, in some cases, dangerous levels of national indebtedness, without things such as these, we will not avoid such a recession," Harper said.
The two leaders discussed the situation in Libya, but Harper clearly signalled their talks on the world economy, including the European debt crisis, were paramount.
Harper lauded Cameron's handling of the UK's financial woes, which has included deep cuts to the public service.
He also commended Cameron for "his consequential handling of the difficult fiscal choices confronting the British economy."
"Here in Canada we have followed your progress carefully, and I can safely say that where it matters most, your thinking parallels that of our own government," said Harper.
NDP foreign affairs critic Paul Dewar said he didn't want to see Harper use Cameron's visit to justify cuts to Canada's federal bureaucracy.
Canadians understand the importance of public services, Dewar said before Cameron's arrival.
"I think Mr. Harper shouldn't be using Mr. Cameron as a foil to … do his work. I don't think that would be accountable, responsible. And I think people would see through it."
Earlier Thursday, Harper and Cameron joined the leaders of Australia, Indonesia, Mexico, and Korea in sending an open letter to French President Nicolas Sarkozy, the G20 chairman, calling for strong action at the November Cannes summit to help ensure global economic stability and growth.
Finance Minister Jim Flaherty also warned of a repeat of the October 2008 recession if action is not taken.
Cameron's address to Parliament was his second speech of the day after addressing the United Nations General Assembly in the morning before his side trip to Canada.
It wasn't his first visit. Cameron attended the G20 Summit in Toronto shortly after being elected to head a coalition government in the spring of 2010.
But Tony Blair was the last British PM visit Canada bilaterally in 2001.
THE FOLLOWING IS THE COMPLETE TEXT OF BRITISH PRIME MINISTER DAVID CAMERON'S SPEECH TO PARLIAMENT:
Mr Speaker, Mr Speaker of the Senate, Mr Prime Minister, Hon Members of the Senate and Members of the House of Commons…
Je vous remercie du grand honneur que vous me faites en m’invitant a m’exprimer devant ce parlement historique.
I want to begin, in this place, by paying tribute to Jack Layton and I offer sincere condolences to Olivia and his family. His energy and optimism were above politics, and I know he will be missed by all those who serve here.
One of the things I am finding about this job is that whichever countries I visit, members of the Royal family have got there first.
I think the Duke and Duchess of Cambridge - Will and Kate as you called them here - have set the bar pretty high this time.
But it is a symbol of the importance of the relationship between our two countries…
…and the long-standing affection that our people show towards each other…
…that the young Royal Couple chose Canada as the destination for their first ever overseas official visit…
…and that the people here gave them such a warm reception.
Sadly I won’t be landing a helicopter in a lake, or wearing a Stetson…
…and I’m sure Prime Minister Harper will be disappointed that he won’t be able to challenge me at Rodeo either.
THE CANADIAN CENTURY
As the author Brian Lee Crowley has set out, there is a strong argument that the 21st Century could well be the Canadian Century.
In the last few years, Canada has got every major decision right.
Look at the facts.
Not a single Canadian bank fell or faltered during the global banking crisis.
Canada got to grips with its deficit and was running surpluses and paying down debt before the recession, fixing the roof while the sun was shining.
Your economic leadership has helped the Canadian economy to weather the global storms far better than many of your international competitors.
The way in which you have integrated people from many different backgrounds into a mature democracy is a model from which we can all learn.
And Canada is preparing now for a better future.
Alberta is the jurisdiction with the best educational results of any English speaking jurisdiction in the world.
From Blackberry to Canadarm, the robot arm used on 90 space shuttle missions, yours is a home of innovation and technology.
In fact Blackberry presented Her Majesty the Queen with one of their smart phones when she visited them last year…
…but Her Majesty already had one!
Canada displays moral clarity and political leadership.
Canadian service men and women have made extraordinary sacrifices in the defence of liberty and democracy.
And yet, while some countries do a little and talk a lot, Canada is self-effacing and self-sacrificing in its contribution to the fight for a better world.
So it is a privilege for me to come here today and honour what you have done.
It’s also a great pleasure to be standing here with my colleague and friend, Prime Minister Harper.
I have seen at first hand over the last sixteen months his outstanding leadership…
…not least at my first G8 and G20 summits in Muskoka and Toronto last year.
Then, as now, the focus of much of our efforts was on the two issues that concern our people most: keeping them safe and getting them jobs.
This evening I want to focus my remarks on how we can work together to address some of the issues in the global economy.
But let me first say something about security.
We’ve all suffered from Islamist extremism.
I have just come from the United Nations where I have argued that the events we have seen this year in North Africa and the Middle East…
…offer a massive opportunity to spread peace, prosperity, democracy and vitally security…
…but only if we work together to seize the opportunity to support the Arab people as they seek to fulfil their aspirations for a job, a voice and a stake in their society.
Our two countries have always been prepared to bear the burden and pay the price to make our world safer and defend our whole way of life.
The Peace Tower in this building commemorates the 67,000 Canadian lives lost in the First World War alone.
Britain owes an incredible debt to Canadian armed forces.
And I want to pay tribute to them today.
Through Two World Wars, Canada was there.
At Vimy Ridge, Passchendaele and Ypres, Canada was there.
At the Somme, when our forces together suffered their worst losses in history, Canada was there.
In fact it was after the Somme that Lloyd George said…
…“The Canadians played a part of such distinction that thenceforward they were marked out as shock troops.... whenever the Germans found the Canadian Corps coming into the line they prepared for the worst."
In our darkest hour in World War II, Canadian naval forces helped keep the sea lanes open during the battle of the Atlantic…
…running convoys across the Atlantic week after week, braving mines, submarines and blacked out silent ships…
…all of which proved absolutely fundamental to our ability to survive as an independent country.
And on Juno Beach it was the 3rd Canadian infantry division and the Royal Canadian Navy that achieved such a remarkable triumph on the first day of the Normandy landings…
…and which on D-Day had got further inland than any of the five other invasion forces.
Today Canada is as vital and influential a military partner as it has ever been.
As partners and founder members of NATO, our forces have been proud to serve alongside each other in international operations…
…from Bosnia to Sierra Leone…
…and most recently from Afghanistan to Libya.
In Afghanistan Canadian and British forces have fought alongside each other in the South…
…in the very toughest part of the country, where few other nations would follow.
Today, Canadian personnel are engaged in vital work training the Afghan National Security Forces.