A lot of things eerily sound like Turkey's AKP (whose full name is also Justice and Development Party). The difference here is US influence in Turkey was in form of US stooage nationalist and Islamist organizations. Especially one of the Islamic sects which was AKP's main ally owned a lot of the media. 10 years later AKP had problems with them (they could not share power and money) and started to rein on them. This caused a schism between AKP and the West. AKP won that conflict and sometimes outright destroyed Western influence agents in Turkey. Worsening economic conditions (Withdrawal of Western support had its effect, but economic failures are mostly of AKP's make) forced them to make a nationalist turn.
Except these, the story is pretty much the same all the way to PiS getting propelled to power by new emerging parties dividing votes. Erdogan got 62% of all parliament seats with just 33% of votes in 2002 elections. They were also pro-EU when they first came.