LONDON (AP) — The former top media adviser to Prime Minister David Cameron was arrested and charged with perjury Wednesday in the trial of a flamboyant ex-Scottish lawmaker — the latest case tied to allegations of wrongdoing by British tabloid newspapers.

Andy Coulson, 44, was detained by Scottish police at his home in London Wednesday morning over an accusation related to testimony he gave in a high-profile case at Glasgow's High Court in 2010, when politician Tommy Sheridan was himself convicted of offering a false account in a legal hearing.

He arrived in Glasgow Wednesday afternoon for questioning there, but was not arrested or charged until late Wednesday evening. In Scotland, which uses a different legal system from the rest of Britain, a suspect can be detained by police to answer questions before being formally arrested or charged.

Strathclyde Police said late Wednesday that a report would now be submitted to Scottish prosecutors, which will determine if Coulson will face court. In Scotland, police can charge a suspect but the decision on whether to prosecute rests with the Crown Office and Procurator Fiscal Service.

Sheridan had won a lawsuit against the now-defunct News of The World tabloid over its claim that he was embroiled in a sex-and-drugs scandal, but was later jailed for three years after a jury at the 2010 trial ruled that he had committed perjury when he sued the newspaper.

Coulson was editor of the tabloid when stories about Sheridan were published, and working as Cameron's communications director when he gave evidence to the 2010 trial.

The ex-aide, who left his post at the News of The World in 2007 after a reporter and a private investigator were jailed over phone hacking offenses, told the court that he didn't "accept there was a culture of phone hacking" at the tabloid.

He insisted that he had ordered his reporters to work within the law and said that police officers were not paid for information.

Those assurances have since been called into question by revelations of widespread illegal behavior at the paper and allegations — denied by Coulson — that he approved and encouraged the shady practices.

Cameron has insisted he had been right to offer Coulson a "second chance," by making him his media chief — but the ex-aide's resignation early last year, his arrest by London police investigating phone hacking, and Wednesday's detention by Scottish police have raised questions about the British leader's judgment.

The prime minister's ties to both Coulson and their mutual friend Rebekah Brooks, an ex-chief executive of Rupert Murdoch's News International, have brought the tabloid phone hacking scandal to Cameron's doorstep.

Sheridan, who was freed from jail after serving a year of his sentence — usual practice for crimes of that type in Scotland — said he now hopes to have his conviction quashed.

"We were led to believe by Mr. Coulson and his acolytes at News International during my trial and the initial phone-hacking investigations that the problem was a rogue reporter," Sheridan told reporters outside his home. "Well, I think we all know now that there is no bad apple in the barrel. What there is is a rotten orchard full of bad apples."

Sheridan's lawyer, Gordon Dangerfield, said he would now appeal the ex-lawmaker's perjury conviction.

In 2006, Sheridan won a defamation suit against the tabloid after it claimed he had visited a swingers' club, had taken part in orgies and used cocaine. However, a year after his courtroom victory against the newspaper, police arrested and charged Sheridan with perjury in connection with the hearing.

The subsequent trial riveted Scotland, with its lurid allegations about sex clubs and tabloid skullduggery.

Coulson arrived in Scotland on Wednesday afternoon for questioning there, but was not formally arrested or charged until Wednesday night.

The police department said the case was tied to Operation Rubicon, a Scottish police investigation into allegations of phone hacking, breaches of data protection and perjury. Those inquiries are running separately to major investigations by London police into newspaper malpractice.

Coulson is currently on police bail in connection with the London inquiry, meaning he must return to answer more questions from detectives there in the near future. He has also testified to the country's media ethics inquiry.

___

Associated Press writer Cassandra Vinograd contributed to this report.

Also on HuffPost:

Loading Slideshow...
  • Rupert Murdoch, Wendi Deng, Lachlan Murdoch

    News Corp. chairman Rupert Murdoch, left, his wife Wendi Deng and son Lachlan Murdoch leave the High Court in London after giving evidence to the Leveson inquiry, Thursday, April 26, 2012. (AP Photo/Sang Tan)

  • Rupert Murdoch, Wendi Deng

    News Corp. chairman Rupert Murdoch and his wife Wendi Deng leave the High Court in London after giving evidence to the Leveson inquiry, Thursday, April 26, 2012. (AP Photo/Sang Tan)

  • Rupert Murdoch

    FILE - In this Jan. 15, 2012 file photo Rupert Murdoch arrives at the 69th Annual Golden Globe Awards in Los Angeles. Murdoch’s News Corp., the global media conglomerate under fire for phone hacking and alleged bribery in Britain, posted a 47 percent increase in third-quarter net income thanks to strong performances at its U.S. pay-TV networks and movie studio (AP Photo/Matt Sayles, file)

  • Rupert Murdoch

    News Corp. chairman Rupert Murdoch arrives at the Allen & Company Sun Valley Conference in Sun Valley, Idaho, Friday, July 13, 2012. (AP Photo/Paul Sakuma)

  • The 20th Annual Sir Elton John Oscar Party - Los Angeles

    Wendi Murdoch arriving at the 84th Annual Academy Awards, held at the Kodak Theatre in Los Angeles, CA, USA on February 26, 2012. ()

  • A campaigner wearing a giant mask depicting News Corporation's chairman Rupert Murdoch burns the Leveson report while another wearing a mask depicting British Prime Minister David Cameron, sits tied to a chair during a protest, calling on MPs to back reform legislation to stop any one media organisation developing a stranglehold over the British media, outside the Queen Elizabeth II Conference Centre in London where Lord Justice Brian Leveson is to release his report into the culture and practices of the British press and his recommendations for future regulation to prevent phone hacking, data theft, bribery and other abuses, Thursday, Nov. 29, 2012. (AP Photo/Sang Tan)

  • Red Magazine Red Hot Women Awards - London

    Elisabeth Murdoch arrives for the annual Red's Hot Women Awards 2012 at One Marylbone, London.

  • Media mogul Rupert Murdoch, center, and his wife Wendi Deng, top, watch Andy Murray of Britain play Roger Federer of Switzerland during the men's singles final match at the All England Lawn Tennis Championships at Wimbledon, England, Sunday, July 8, 2012. (AP Photo/Paul Gilham, Pool)

  • James Murdoch, Lachlan Murdoch

    James Murdoch, left, son of Rupert Murdoch and deputy chief operating officer of News Corp., and Lachlan Murdoch, right, son of Rupert Murdoch and former executive with News Corp., arrive at the Allen & Company Sun Valley Conference in Sun Valley, Idaho, Wednesday, July 11, 2012. (AP Photo/Paul Sakuma)

  • James Murdoch

    James Murdoch, son of Rupert Murdoch and deputy chief operating officer of News Corp., arrives at the Allen & Company Sun Valley Conference in Sun Valley, Idaho, Wednesday, July 11, 2012. (AP Photo/Paul Sakuma)

  • Rupert Murdoch, Wendi Murdoch

    Media mogul Rupert Murdoch and his wife, Wendi, arrives at the Allen & Company Sun Valley Conference in Sun Valley, Idaho, Thursday, July 12, 2012. (AP Photo/Paul Sakuma)

  • Lachlan Murdoch

    Lachlan Murdoch, son of Rupert Murdoch and former executive with News Corp., arrives at the Allen & Company Sun Valley Conference in Sun Valley, Idaho, Thursday, July 12, 2012. (AP Photo/Paul Sakuma)

  • Rupert Murdoch, Wendi Murdoch

    Rupert Murdoch and his wife, Wendi, arrives at the Allen & Company Sun Valley Conference in Sun Valley, Idaho, Thursday, July 12, 2012. (AP Photo/Paul Sakuma)

  • Sergey Brin, Wendy Deng

    Google co-founder Sergey Brin shows his "Google Glasss" to Wendi Deng, Rupert Murdoch's wife, at the Allen & Company Sun Valley Conference in Sun Valley, Idaho, Thursday, July 12, 2012. (AP Photo/Paul Sakuma)

  • Lachlan Murdoch

    Lachlan Murdoch, son of Rupert Murdoch and former executive with News Corp., arrives at the Allen & Company Sun Valley Conference in Sun Valley, Idaho, Friday, July 13, 2012. (AP Photo/Paul Sakuma)

  • Rupert Murdoch, Michael Bloomberg

    From left, News Corporation CEO Rupert Murdoch, speaks as New York Mayor Michael Bloomberg looks on during a forum on The Economics and Politics of Immigration in Boston, Tuesday, Aug. 14, 2012. (AP Photo/Josh Reynolds)

  • Rupert Murdoch,

    News Corporation CEO Rupert Murdoch, speaks during a forum on The Economics and Politics of Immigration in Boston at which Murdoch and New York Mayor Michael Bloomberg spoke, Tuesday, Aug. 14, 2012. (AP Photo/Josh Reynolds)

  • Rupert Murdoch,

    News Corporation CEO Rupert Murdoch, speaks during a forum on The Economics and Politics of Immigration in Boston at which Murdoch and New York Mayor Michael Bloomberg spoke, Tuesday, Aug. 14, 2012. (AP Photo/Josh Reynolds)

  • Rupert Murdoch,

    News Corporation CEO Rupert Murdoch, listens to introductions during a forum on The Economics and Politics of Immigration in Boston at which Murdoch and New York Mayor Michael Bloomberg spoke, Tuesday, Aug. 14, 2012. (AP Photo/Josh Reynolds)

  • Rupert Murdoch, Michael Bloomberg

    From left, News Corporation CEO Rupert Murdoch, looks on as New York Mayor Michael Bloomberg speaks during a forum on The Economics and Politics of Immigration in Boston, Tuesday, Aug. 14, 2012. (AP Photo/Josh Reynolds)

  • James Murdoch Gives Evidence At The Leveson Inquiry

    LONDON, ENGLAND - APRIL 24: Protesters from the campaign group 'Avaaz' demonstrate outside the High Court with large James and Rupert Murdoch masks as former News International chairman James Murdoch gives evidence to The Leveson Inquiry on April 24, 2012 in London, England. This phase of the inquiry into the culture, practice and ethics of the press in the United Kingdom is looking at the owners of various media groups. Rupert Murdoch, owner of News Corp, will give evidence tomorrow. (Photo by Oli Scarff/Getty Images)

  • James Murdoch, son of media mogul Rupert

    James Murdoch, son of media mogul Rupert Murdoch, arrives at London's High Court, on April 24, 2012, ahead of his appearance before the Leveson Inquiry. The Inquiry was set up after a phone hacking scandal led to the closure of the News of the World tabloid in 2011. Rupert Murdoch appears at the Inquiry on Wednesday and possibly Thursday. AFP PHOTO / LEON NEAL (Photo credit should read LEON NEAL/AFP/Getty Images)

  • Rupert Murdoch Returns To His Home Ahead Of His Appearance At the Leveson Inquiry

    LONDON, ENGLAND - APRIL 23: Rupert Murdoch, CEO of News Corporation arrives at his house, two days before he is due to give evidence to the Leveson Inquiry, on April 23, 2012 in London, England. This phase of the inquiry into the culture, practice and ethics of the press in the United Kingdom is looking at the owners of various media groups. The inquiry, which may take a year or more to complete, comes in the wake of the phone hacking scandal that saw the closure of The News of The World newspaper in 2011. (Photo by Matthew Lloyd/Getty Images)

  • Rupert Murdoch (C), Chairman and CEO of

    Rupert Murdoch (C), Chairman and CEO of News Corp. and John Witherow (R), Editor of the Sunday Times of London, leave the funeral of slain Times of London correspondent Marie Colvin, at St. Dominic's Catholic Church on March 12, 2012 in Oyster Bay, New York. Colvin was killed in Syria along with French photographer Remi Ochlik as the two were covering the violence in the city of Homs on February 22. AFP PHOTO/Stan HONDA (Photo credit should read STAN HONDA/AFP/Getty Images)

  • Rupert Murdoch (L), Chairman and CEO of

    Rupert Murdoch (L), Chairman and CEO of News Corp. and John Witherow (R), Editor of the Sunday Times of London, leave the funeral of slain Times of London correspondent Marie Colvin, at St. Dominic's Catholic Church on March 12, 2012 in Oyster Bay, New York. Colvin was killed in Syria along with French photographer Remi Ochlik as the two were covering the violence in the city of Homs on February 22. AFP PHOTO/Stan HONDA (Photo credit should read STAN HONDA/AFP/Getty Images)

  • The First Editions Of The Sun On Sunday Hit The Newstands

    BROXBOURNE, UNITED KINGDOM - FEBRUARY 25: (EDITORS NOTE: THIS IMAGE IS FREE FOR USE UNTIL MARCH 3 2012) In this handout photograph provided by News International, Rupert Murdoch, Chairman and CEO of News Corporation, reviews the first edition of The Sun On Sunday as it comes off the presses on February 25, 2012 in Broxbourne, England. Around 3 million copies of 'The Sun On Sunday', the first ever Sunday edition of News International's daily tabloid newspaper 'The Sun', are due to go on sale on Sunday February 26, 2012. (Photo by Arthur Edwards/News International via Getty Images)

  • The First Editions Of The Sun On Sunday Hit The Newstands

    BROXBOURNE, UNITED KINGDOM - FEBRUARY 25: Rupert Murdoch, Chairman and CEO of News Corporation, arrives to oversee the first editions of the 'The Sun On Sunday' newspaper coming off the priniting press on February 25, 2012 in Broxbourne, England. Around 3 million copies of 'The Sun On Sunday', the first ever Sunday edition of News International's daily tabloid newspaper 'The Sun', are due to go on sale on Sunday February 26, 2012. News Corporation CEO Rupert Murdoch, who has flown into the UK to oversee the launch, said he would be 'very happy' if sales of his new paper exceed two million copies and enjoyed similar success to the 'News Of The World', its defunct predecessor. (Photo by John Stillwell - WPA Pool/Getty Images)

  • Rupert Murdoch Sighting In London

    LONDON, ENGLAND - FEBRUARY 21: News Corp. CEO Rupert Murdoch smiles as he leaves his flat on February 21, 2012 in London, England. Mr Murdoch has announced that a new paper 'The Sun on Sunday' will publish it's first edition this weekend. (Photo by Peter Macdiarmid/Getty Images)

  • 69th Annual Golden Globe Awards - Arrivals

    BEVERLY HILLS, CA - JANUARY 15: Rupert Murdoch and wife Wendi Murdoch arrive at the 69th Annual Golden Globe Awards held at the Beverly Hilton Hotel on January 15, 2012 in Beverly Hills, California. (Photo by Jason Merritt/Getty Images)

  • Rupert Murdoch Delivers Keynote At The National Summit On Education Reform

    SAN FRANCISCO, CA - OCTOBER 14: News Corp. CEO Rupert Murdoch delivers a keynote address at the National Summit on Education Reform on October 14, 2011 in San Francisco, California. Rupert Murdoch was the keynote speaker at the two-day National Summit on Education Reform. (Photo by Justin Sullivan/Getty Images)

  • Rupert Murdoch Delivers Keynote At The National Summit On Education Reform

    SAN FRANCISCO, CA - OCTOBER 14: News Corp. CEO Rupert Murdoch (L) shakes hands with Joel Klein (R) during a keynote address at the National Summit on Education Reform on October 14, 2011 in San Francisco, California. Rupert Murdoch was the keynote speaker at the two-day National Summit on Education Reform. (Photo by Justin Sullivan/Getty Images)

  • Rupert Murdoch Delivers Keynote At The National Summit On Education Reform

    SAN FRANCISCO, CA - OCTOBER 14: News Corp. CEO Rupert Murdoch pauses as he delivers a keynote address at the National Summit on Education Reform on October 14, 2011 in San Francisco, California. Rupert Murdoch was the keynote speaker at the two-day National Summit on Education Reform. (Photo by Justin Sullivan/Getty Images)

  • Occupy Wall Street Protestors March Down New York's Fifth Avenue

    NEW YORK, NY - OCTOBER 11: Protesters with the 'Occupy Wall Street' movement yell up to the residence of NewsCorp CEO Rupert Murdoch on October 11, 2011 in New York City. Hundreds of activists marched along 5th avenue and Park Avenue stopping in front of the buildings where prominent heads of major business and financial institutions live. Many of the 'Occupy Wall Street' demonstrations have been living in Zuccotti Park in the Financial District near Wall Street. The activists have been gradually converging on the financial district over the past three weeks to rally against the influence of corporate money in politics among a host of other issues. The protests have begun to attract the attention of major unions and religious groups as the movement continues to grow in influence. (Photo by Spencer Platt/Getty Images)

  • The generval view shows newspapers in Me

    The generval view shows newspapers in Melbourne on July 21, 2011 with coverage dominated by Rupert Murdoch's appearance before a British parliamentary committee and moves in Australia to introduce a legal right to privacy after the phone-hacking scandal in Britain, paving the way for people to sue media organisations for serious breaches. Home Affairs Minister Brendan O'Connor said he was acting now after the News of the World furore heightened concerns. AFP PHOTO / William WEST (Photo credit should read WILLIAM WEST/AFP/Getty Images)

  • News Corporation Chief Rupert Murdoch re

    News Corporation Chief Rupert Murdoch reads a copy of one his newspapers, The London Times, as he leaves his London home on July 20 2011. Australian Prime Minister Julia Gillard on Wednesday warned Rupert Murdoch's Australian arm it faced some 'hard questions' as calls intensified for a media inquiry following the British hacking scandal. Gillard declined to comment on Murdoch's grilling by British MPs over the outcry that saw him close tabloid News of the World and dump his bid for satellite broadcaster BSkyB, but said the Australian public was concerned. AFP PHOTO/CARL COURT (Photo credit should read CARL COURT/AFP/Getty Images)

  • Leveson Inquiry

    Lachlan Murdoch leaving his father Rupert's home in Mayfair, central London as his brother James, gives evidence to the Leveson Inquiry into press standards.

  • Rupert Murdoch with Queen Elizabeth II in 1985

    File photo dated 28/02/1985 of Queen Elizabeth II with proprietor Rupert Murdoch (left) at The Times newspaper building at Grays Inn Road, London, to mark the paper's bicentenary.

  • Rupert Murdoch with Princess Diana

    Diana, Princess of Wales with Rupert Murdoch, proprietor of The Times, as she arrived at Hampton Court Palace to attend a gala evening to celebrate the newspaper's bicentenary.

  • Media - News of the World Take-over Meeting - Connaught Rooms, Bloomsbury

    Handshakes by Rupert Murdoch, chairman of the Australian group News Ltd[Right] and Sir William Carr, chairman of the news of the world organisation, after what was for them the succesful outcome of the vital NOTW shareholdersw meeting at the connaught rooms, bloomsbury, london. By a show of hands, shareholders voted 299 in favour and 20 against a resolution regarding the creation of further ordinary shares and their allotment to News ltd. This meant the virtual end of the take-over bid by Milliionaire labour MP Robert Maxwell.

  • New technology print works

    Newspaper proprietor Rupert Murdoch holds copies of the Sun at his new high technology print works in Wapping, East London.

  • Thatcher papers on show

    BLACK AND WHITE ONLY. File photo dated 22/01/1981 of Rupert Murdoch at a press conference in London, discussing the future of The Times newspaper.

  • New Sunday Sun tabloid

    File picture, dated 17/11/1969, Rupert Murdoch looks at one of the first copies of The Sun newspaper, at the News of the World building , in London.

  • Media - The Times Newspaper Bicentenary - London

    Queen Elizabeth II and the Duke of Edinburgh with proprietor Rupert Murdoch, left, at The Times newspaper building at Grays Inn Road, London, to mark the paper's bicentenary.

  • Margaret Thatcher, Rupert Murdoch

    FILE - In this Nov. 14, 1991, file photo, Margaret Thatcher accepts the United Cerebral Palsy of New York's 37th Annual Humanitarian Award in New York from Rupert Murdoch. (AP Photo/Mike Albans, File)