I first had a preliminary phone interview to check my motivations for the job with an HR person. I had a phone interview a week later with an IT guy to check my programming and computer science background which lasted for 40 minutes. Two weeks afterwards, I was supposed to have a non technical interview in the company local office with a hiring manager, but when I went for it it turned out to be another technical interview with 3 Senior IT Analysts working for the company.
Basically, the HR person based in the US who I relied on to give me accurate information about the whole recruiting process was misleading me. I didn't do well in the last interview because I didn't prepare beforehand for the kind of technical questions that are to be expected in technical interviews. I just improvised, but it was not enough obviously.