The former News of the World deputy editor arrested last week over allegations of phone hacking was an adviser to the Conservative party before the election.

Neil Wallis helped the prime minister's director of communications, Andy Coulson, in 2009, as they prepared for the general election campaign.

A source said Wallis worked on a "short-term project" believed to have lasted around a week although he did not receive payment.

It is understood Wallis, who was Coulson's deputy when he edited the News of the World, was advising on how best to get coverage in tabloid newspapers on a "specific" policy proposal.

It is not known whether Wallis attended Conservative party central headquarters and the party would not disclose details about the issue on which he worked. A party source insisted, however, that it had nothing to do with phone hacking. "It was uncontroversial," he added.

A Tory party spokesman said Wallis's involvement emerged over the weekend when the party was asked by a journalist whether the former tabloid executive had ever been paid for work by the party.

He added that the prime minister was only made aware of Wallis's work in recent days.

The spokesman said: "It has been drawn to our attention that [Wallis] may have provided Andy Coulson with some informal advice on a voluntary basis before the election. We are currently finding out the exact nature of any advice.

"We can confirm that apart from Andy Coulson, neither David Cameron nor any senior member of the campaign team were aware of this until this week."

The shadow culture secretary, Ivan Lewis, said: "This revelation raises further serious concerns about David Cameron's judgment in appointing Andy Coulson.

"He must now come clean about Neil Wallis's role and activities in supporting Andy Coulson, both in his capacity as director of communications for the Tory party, and then the prime minister."