The BBC has apologised for underpaying former China editor Carrie Gracie and reached an agreement over her back pay.

The journalist will donate the funds to gender equality charity The Fawcett Society, to set up a fund for women who need legal advice on equal pay claims.

Earlier this year Ms Gracie, who is still employed by the BBC, told MPs that the corporation treated women who spoke out about pay disparity as "the enemy".

She reserved special criticism for BBC director-general Tony Hall who she was "disappointed" in after he complained about the government forcing the broadcaster to reveal the pay of on-screen talent.

A statement from the corporation said: "The BBC acknowledges that Carrie was told she would be paid in line with the North America editor when she took the role of China editor, and she accepted the role on that understanding.

"The BBC is committed to the principle of equal pay and acting in accordance with our values.

"The BBC acknowledges the specific circumstances relating to Carrie's appointment, apologises for underpaying Carrie, and has now put this right.

"Carrie is donating the full amount received to a charity of her choice."

The BBC praised the "important contribution" Ms Gracie has made, adding: "During her tenure as China editor, Carrie delivered reports, analysis and work, that were as valuable as those of the other international editors in the same period."

Ms Gracie will now take up to six months of unpaid leave at her own request, using the time to write and speak on both China and gender equality.

She said: "I am glad to have been able to resolve this with the director-general, it shows that we can make progress.

"I'm also pleased that my work as China editor has now been properly recognised by the BBC and relieved that this difficult period is over.

"For me, this was always about the principle, rather than the money.

"I'm delighted to donate all the backdated pay from the BBC to help women striving for equality at work."

Mr Hall added: "I am pleased that we've been able to move past our differences and work through things together; we can now look to the future.

"I'm also glad that Carrie will be contributing to Donalda MacKinnon's project to make the BBC a great place for women to work.

"That really matters to me, and I want us to lead the way."