A China court has sentenced a British-American couple to two years in prison for illegally obtaining private data on Chinese citizens.

The court in Shanghai said that company investigator Peter Humphrey and his American wife Yu Yingzeng would be allowed to appeal against their sentences.

The couple's arrest more than a year ago coincided with a government probe into allegations that staff of GlaxoSmithKline (GSK), the British drugmaker, had funnelled hundreds of millions of pounds through travel agencies to bribe local doctors and health officials to boost sales and raise prices.

GSK China hired Humphrey to work for them last year.

In the first case of its kind involving foreigners in China, prosecutors had charged the couple with illegally accessing and selling private information. GSK was not mentioned in the charge sheet.

The prosecutors said the couple had illegally obtained more than 200 items of private information from April 2009 to July 2013, including household registration data, real property documents and phone records, and then re-sold the data.

Based on the information, the couple are alleged to have compiled so-called "investigation reports" and sold them at high prices to their clients, most of which are China-based multinational corporations, including GSK China.

Similar checks

Humphrey, 58, and Yu, 61, ran risk consultancy called ChinaWhys.

"In other countries, we were able to conduct similar checks, including personal information and private transactions, legally through courts," said Yu.

"If we had known that it was illegal, my husband and I would have destroyed all traces of this information."

While Chinese authorities have not openly connected the arrest of the couple to the GSK probe, Humphrey said in a note last year when he was already in detention that he felt "cheated" by GSK, adding that the drugmaker had not shared the full details of the bribery allegations.

A GSK spokesman has declined to comment on the trial. The drugmaker said in July that the issues relating to its China business were "very difficult and complicated".

Foreign reporters were given unusual access to the trial after lobbying by the US and British embassies.