Image copyright Reuters Image caption Justin Trudeau, Tom Mulcair and Stephen Harper on stage

The state of Canada's economy has been the main topic for the country's three party leaders in their second election debate in Calgary.

Prime Minister Stephen Harper had a tetchy back and forth with opposition leaders Tom Mulcair and Justin Trudeau over the sluggish economy.

The country, hard hit by falling energy prices, officially entered a recession in the first half of this year.

Mr Harper said his rivals would damage the economy if they took power.

"The other parties are trying to tell us they will deal with the challenges of our economy, of our labour market, of international markets, by raising taxes and running deficits to finance vastly increased amounts of spending," he said.

His Conservative government this week reported a C$1.9bn (£900m) budget surplus, and he vowed to keep taxes and spending low.

"Mr Harper wants to hit the snooze button while Mr Trudeau is hitting the panic button," said New Democratic Party leader Mr Mulcair.

Mr Trudeau of the Liberals said the worst growth rate since the Great Depression was the fault of the Conservatives.

At the scene - Anthony Zurcher, BBC News, Calgary

Given the tightness of the three-way race for control of the Canadian government, it's not surprising that Thursday night's leaders' debate got chippy early. All three candidates exchanged barbs and interrupted each other on topics like economic policy, the environment and immigration.

With his nation's economy struggling following the sharp decline of the Canadian energy sector, Prime Minster Stephen Harper's record 10-year tenure in office is clearly in jeopardy. From the start of the debate it seemed his goal was to paint Justin Trudeau of the Liberal Party of being in favour of out-of-control deficit spending and the NDP's Thomas Mulcair of killing jobs by raising taxes, while promising stability in tough times.

Both of his opponents fought back, and occasionally directed swipes at their left-of-centre counterparts. Mr Trudeau asked if Canadians were better off now than they were 10 years ago, while Mr Mulcair accused Mr Harper of fearmongering when it came to immigration and national security.

The debate often descended into cacophony, evidence that on the debate stage, three is definitely a crowd.

Image copyright AP/REUTERS/AFP Image caption Justin Trudeau (left), Stephen Harper and Tom Mulcair laid out their economic agendas

The Conservatives have pointed to the surplus as a sign of its successful stewardship of the economy. Mr Harper maintains the recession is a temporary setback.

While Mr Mulcair has developed a slight lead in recent polls, the three-way race remains close.

Mr Harper's centre-right Conservative Party has been in office since 2006 and analysts say he could struggle to form another majority government.

The son of a former prime minister, Mr Trudeau benefits from high name recognition but has been criticised by his rivals for his lack of experience.

Mr Mulcair and the NDP, which earlier this year saw big gains in the Conservative stronghold of Alberta, are hoping to keep their momentum going, offering voters change as well as experience.

Image copyright Reuters Image caption The energy sector - stung by failing oil prices - is a major part of Canada's economy

In five words...

Next month's federal elections are a chance for Canadians to cast their verdict on the state of the country - and the government that's been running it.

Millions will vote on 19 October but each individual voice matters - and BBC Pop Up wants to know how you feel about your country.

Are you happy with your politicians and the political system? Are the parties addressing or ignoring the issues that matter to you? Is Canada heading in the right or wrong direction?

In five words, tell us how you feel about today's Canada. We'll share your thoughts with a global audience - and if you have a story idea that highlights an important issue for this election we may be able to come visit and film it.

Get involved using #bbcpopup on Twitter, Facebook and Instagram. Or email us at bbcpopup@bbc.co.uk

Read more at bbc.com/popup