It's impossible for us to know exactly what occurred.
What we do know is that every sign seemed good, until the point where you provided your pervious salaries.
It's possible they realised they could not afford you, and instead elected to look elsewhere. In the future, make sure that salary exceptions are managed from the start - just in case this was the cause.
Alternatively, it's possible you were an excellent candidate, and they were very certain they were going to hire you, but an even better candidate was interviewed later.
Or senior management wanted to hire from overseas.
Or the budget for your role was significantly reduced.
Or there was a screw up.
It's impossible for us or you to know. I recommend you email them back to confirm, ensuring the HR person has a very clear understanding that you were expecting an offer based upon previous discussion you had. They may volunteer some additional information.
But in any case, you just move on, and remember that until you have a signed offer, you don't have an offer, and should continue looking.