LONDON : Andy Coulson, Prime Minister David Cameron’s ex-media chief and a former Rupert Murdoch editor, agreed to fund the hacking of phones of aides to Prince William and Harry, a former reporter told a London court on Tuesday.

Clive Goodman, the ex-royal editor of Murdoch’s now defunct News of the World tabloid who was jailed in 2007 for hacking the phones of the senior royal aides, said Coulson approved a 500 pound weekly payment to a private detective to tap the voicemails of staff working for QueenElizabeth’s grandsons.

Goodman told London’s Old Bailey court the deal was agreed initially for two months at the end of 2005.

Coulson, 46, edited the News of the World tabloid at the centre of a phone-hacking scandal for four years and has always denied any knowledge of the practice.

He resigned after Goodman was jailed in 2007.

He joined Cameron’s office after leaving the newspaper, working for the Conservative leader who became prime minister May 2010. Coulson resigned in January 2011 due to escalating news coverage of the phone-hacking scandal.

The hacking scandal forced the closure of the mass-selling Sunday tabloid and prompted a huge police inquiry.

The scandal also led to a year-long public inquiry into journalistic practices which sent shockwaves through the British establishment as it laid bare the close links between media, police and politicians.

Both Goodman and Coulson are on trial accused over illegal payments made to police officers in return for telephone directories of the royal household. Coulson is also accused of conspiring to illegally access the voicemails of mobile phones.

Five others are also on trial and they all deny the charges.