The Newswatch presenter brought the corporation to an employment tribunal last year, claiming she was paid a sixth of what Jeremy Vine received for hosting the similar show Points of View.
In a statement after the ruling, Ahmed said she was looking forward “to continuing to do my job, to report on stories and not being one”.
“No woman wants to have to take action against their own employer,” she said. “I love working for the BBC. I’m glad it’s been resolved.”
The BBC had argued it was justified due to differences in news and entertainment shows.
However, on Friday an employment panel ruled unanimously that the BBC had failed to prove the difference in Ahmed and Vine’s pay was “because of a material factor which did not involve subjecting the claimant to sex discrimination”.
According to the ruling, the BBC had argued that a different set of skills were needed by Vine to present Points of View, including needing to have “a glint in the eye”.
However, the judge said that the attempts at humour on the programme “came from the script”.
“If it told him to roll his eyes, he did,” the ruling read. “It did not require any particular skill or experience to do that.
“We do not accept that the lighter tone of Points of View meant that the claimant’s work and that of Mr Vine were not broadly similar.”
Responding to the ruling, the BBC said that Ahmed “is an excellent journalist and presenter, and we regret that this case ever had to go to tribunal”.
A statement continued: “We’re committed to equality and equal pay. Where we’ve found equal pay cases in the past we’ve put them right. However, for us, this case was never about one person, but the way different types of programmes across the media industry attract different levels of pay.
“We have always believed that the pay of Samira and Jeremy Vine was not determined by their gender. Presenters – female as well as male – had always been paid more on Points of View than Newswatch.”
The BBC said it would “consider this judgment carefully,” adding that the broadcaster wants “to work together with Samira to move on in a positive way”.
On Friday, former BBC China editor Carrie Gracie, who has fought her own equal pay battle, tweeted: ”@SamiraAhmedUK I could not be more proud of you... and all the #bbcwomen at your back.
“2020 is the 50th anniversary of the Equal Pay Act and I hope your victory gives courage to women everywhere to stand up for the value of their work. As for #BBC bosses, time to stop digging.”
Meanwhile, BBC Women’s Hour host Jane Garvey tweeted: “Just brilliant @SamiraAhmedUK – it took real courage and she has it. #equalpay”