Media playback is unsupported on your device Media caption Secret filming shows Patrick Mercer signing a contract with the fake lobbying company set up by BBC Panorama

MP Patrick Mercer has resigned the Tory whip to "save my party embarrassment" after claims by the BBC's Panorama that he broke Parliament's lobbying rules.

It is alleged he accepted £4,000 to lobby for business interests in Fiji.

Mr Mercer said he was taking legal advice and had referred himself to Parliament's standards commissioner.

The Newark MP said he took the money for consultancy work outside parliament. He added he would not be standing at the next general election.

'£1,000 a day'

Panorama said Mr Mercer had been approached by a fake company set up by the programme, in conjunction with the Daily Telegraph.

The fake company, Alistair Andrews Communications, had claimed to lobby on behalf of Fijian business interests for Fiji to be re-admitted to the Commonwealth.

If it's bad enough for you to resign from your party, how can it be OK to continue representing constituents at all? Zac Goldsmith, Conservative MP

The country's membership was suspended in 2009 amid criticism of its human rights' record and lack of democracy.

A clip of Mr Mercer being filmed undercover has been released by Panorama. It shows the MP meeting with an undercover reporter, who was posing as a representative of the fake company.

Mr Mercer can be heard saying: "I do not charge a great deal of money for these things. I would normally come out at £500 per half day, so £1,000 a day."

The undercover reporter replies: "Ok fine."

Panorama said it had paid Mr Mercer £4,000 for working two days a month at a rate of £2,000 per month, but that the money had yet to be declared to the parliamentary authorities.

In a statement the programme said: "Patrick Mercer MP said he agreed to be a consultant for work he said was outside parliament.

"But he submitted five parliamentary questions, which were all answered, as well as an early day motion - all in relation to Fiji."

'Legal advice'

Under parliamentary rules, politicians are required to declare publicly money that they receive beyond their parliamentary salary, but some paid work should not be undertaken at all.

For example, MPs should not be paid "to ask a parliamentary question, table a motion, introduce a bill, table an amendment to a motion or a bill, or urge colleagues or ministers to do so".

In a statement, Mr Mercer said: "Panorama are planning to broadcast a programme alleging that I have broken parliamentary rules.

Patrick Mercer Biography Born in 1956, the son of an Anglican clergyman who went on to become the Bishop of Exeter

Studied modern history at Oxford University and attended the Royal Military Academy at Sandhurst

Spent 25 years as an army officer, serving in Northern Ireland, Bosnia, Uganda and other countries, before working as a journalist

Elected as MP for Newark in 2001

Served as shadow minister for homeland security under Iain Duncan Smith, Michael Howard and David Cameron, before Mr Cameron fired him in 2007 after a row over alleged racist comments

He is married with one son and lives just outside Newark Patrick Mercer Profile

"I am taking legal advice about these allegations - and I have referred myself to the Parliamentary Commissioner for Standards.

"In the meantime, to save my party embarrassment, I have resigned the Conservative whip and have so informed [Conservative Chief Whip] Sir George Young.

"I have also decided not to stand at the next general election."

MPs who resign the whip can continue to sit in the Commons as independents but are no longer members of the parliamentary party.

Conservative MP Zac Goldsmith said it highlighted the need for voters to get powers to force by-elections: "If it's bad enough for you to resign from your party, how can it be OK to continue representing constituents at all? Where's that recall?!" he wrote on the Twitter website.

Colonel Bob Stewart, a fellow Tory MP and friend of Mr Mercer's, said he was "surprised" by the allegations, but added that if Mr Mercer had done something wrong he would act "totally honourably".

A Conservative spokesman said the prime minister was aware of the allegations and thought Mr Mercer had "done the right thing in referring himself to the Parliamentary Commissioner for Standards and resigning the whip".

"It's important that the due processes take their course," the spokesman said.

Race row

Parliamentary records show that in March, Mr Mercer put down an early day motion - used by MPs to draw attention to issues - saying Fiji was making efforts to restore democracy and there was no justification for its continued suspension from the Commonwealth.

He also asked five questions in Parliament about Fiji's human rights record, UK investment in its public transport and the effects of its suspension from, and government policy on, its readmission to the Commonwealth.

Parliamentary rules on lobbying All MPs are subject to a Code of Conduct

According to the code they have to register their financial interests, including remunerated employment outside parliament

They are allowed to work as a consultants or be paid for advice

However, MPs are forbidden from acting as a "paid advocate"

A paid advocate is defined as someone taking "payment for speaking in the House"

It also covers receiving payment for asking a parliamentary question, tabling a motion, introducing a bill or tabling or moving an amendment to a motion or bill or urging colleagues or ministers to do so

All the questions were answered by Foreign Office Minister Hugo Swire.

Mr Mercer, a former army officer, was sacked as shadow homeland security minister by David Cameron in 2007 after a row over alleged racist comments.

The coalition government is committed to setting up a statutory register of lobbyists - companies that seek to influence government policy, often by paying former MPs for advice and guidance.

Before the 2010 election, Mr Cameron predicted that it would be the next big scandal to hit British politics, but the policy, which is in the coalition agreement, has yet to make it into the government's legislative programme.

The government held a consultation on a statutory register of lobbyists, which concluded in April 2012.

The Cabinet Office said it was "still considering" the "many different views" articulated by those who contributed to that consultation.