Image copyright Reuters Image caption A combination photo shows the couple leaving court in a police car

A British company investigator, Peter Humphrey, has been sentenced to two-and-a-half years in jail for trafficking personal data in China.

The Shanghai court also sentenced his American wife Yu Yingzeng to two years.

GlaxoSmithKline (GSK) China, which is being investigated for possible bribery, hired Mr Humphrey last year.

The pair were found guilty of illegally obtaining Chinese citizens' data and selling it to China-based multinational firms, including GSK China.

Both admitted buying background information - but said they did not realise it was illegal to do so.

They have the right to appeal against their sentences within 10 days.

A court official also announced that Humphrey would be deported, but gave no further details, Reuters news agency reports.

Image copyright AFP Image caption The court released an image of proceedings showing Mr Humphrey (2L) and Yu Yingzeng (in red)

The verdict did not make a link between Humphrey's investigations and the allegations against the pharmaceutical giant GSK.

Those allegations first emerged in an email in January 2013 from an anonymous and self-styled whistleblower to the company.

The email alleges that GSK's sales teams targeted influential doctors with expensive gifts and cash to win business. It was sent to GSK's London-based CEO Andrew Witty and made accusations against GSK China's general manager Mark Reilly.

Later a sex tape featuring Mr Reilly and his girlfriend was also sent.

The arrest of Humphrey and his wife came weeks after he delivered an investigation report to GSK.

The multinational had asked his corporate investigations company, ChinaWhys, to find out who had sent the email and how the video had been filmed.

GSK told Humphrey it suspected Vivian Shi, a former GSK executive reported to have close ties to senior Communist Party officials. She denies being the whistleblower.

The BBC's John Sudworth in Shanghai says this was a show trial staged by a Communist-controlled judiciary. Humphrey is collateral damage caught up in China's case against GSK, our correspondent adds.

How case unfolded: