The BBC's China editor Carrie Gracie has resigned from her post, citing pay inequality with male colleagues.

In an open letter, Ms Gracie - who has been at the BBC for more than 30 years - accused the corporation of having a "secretive and illegal pay culture".

She said the BBC was facing a "crisis of trust", after it was revealed two-thirds of its stars earning more than £150,000 were male.

The BBC said there was "no systemic discrimination against women".

Ms Gracie said she left her role as editor of the corporation's Beijing bureau last week, but would remain with the BBC.

She said she would return to her former post in the TV newsroom "where I expect to be paid equally".

Ms Gracie is co-presenting BBC Radio 4's Today programme on Monday.

In the letter, posted on her blog, Ms Gracie - a China specialist who is fluent in Mandarin - said "the BBC belongs to you, the licence fee payer.

"I believe you have a right to know that it is breaking equality law and resisting pressure for a fair and transparent pay structure."

In July last year, the BBC was forced to reveal the salaries of all employees earning more than £150,000 a year.

Ms Gracie said she was dismayed to discover the BBC's two male international editors earned "at least 50% more" than its two female counterparts.

US editor Jon Sopel earned £200,000-£249,999, it was revealed, while Middle East editor Jeremy Bowen earned £150,000-£199,999.

Ms Gracie was not on the list, meaning her salary was less than £150,000.

A letter calling for equal pay - published in the Telegraph - was later signed by both Ms Gracie and BBC Europe editor, Katya Adler.

Equal pay

In her open letter, Ms Gracie said: "The Equality Act 2010 states that men and women doing equal work must receive equal pay.

"But last July I learned that in the previous financial year, the two men earned at least 50% more than the two women.

"Despite the BBC's public insistence that my appointment demonstrated its commitment to gender equality, and despite my own insistence that equality was a condition of taking up the post, my managers had yet again judged that women's work was worth much less than men's."

Media playback is unsupported on your device Media caption Carrie Gracie returned to Beijing in 2014 after several years' absence

Ms Gracie said she asked for the four international editors to be paid equally.

"Instead the BBC offered me a big pay rise which remained far short of equality," she added.

"I believe I am very well paid already - especially as someone working for a publicly funded organisation.

"I simply want the BBC to abide by the law and value men and women equally."

She said "patience and good will are running out" among female staff.

Industry support

BBC media editor Amol Rajan said Ms Gracie's resignation was a "big, big headache" for the corporation.

Michelle Stanistreet, general secretary of the National Union of Journalists, said it was "no surprise" that Ms Gracie was not prepared to stay silent about the "scourge of unequal pay" at the BBC.

"[The letter] makes it clear what a difficult decision it has been to speak out about what she calls a crisis of trust at the BBC, but why it is vital that the British public are clear about why she has been forced to resign her post."

On Twitter, many people, including BBC journalists, have expressed support for Ms Gracie using the hashtag #IStandWithCarrie, echoing the #BBCWomen hashtag that was prominent last summer.

'No systemic discrimination'

In a statement, a BBC spokeswoman said "fairness in pay" at the corporation "is vital".

"A significant number of organisations have now published their gender pay figures showing that we are performing considerably better than many and are well below the national average.

"Alongside that, we have already conducted a independent judge led audit of pay for rank and file staff which showed 'no systemic discrimination against women'.

"A separate report for on air staff will be published in the not too distant future."

Last year, a report published by the BBC found there was a 10.7% gender pay gap in favour of men when the mean average hourly pay rates were compared.

Director general Lord Hall pledged to close the gap by 2020, saying the corporation should be "an exemplar of what can be achieved when it comes to pay, fairness, gender and representation".