THESE should be the best of times for Binyamin Netanyahu. At no point in the Israeli prime minister’s almost 11 years in office has he enjoyed such supremacy at home, coupled with an absence of any serious difficulties or pressure from abroad. In the past few months he has expanded his coalition’s majority from only one to six; tamed his most ferocious critic, Avigdor Lieberman, by giving him responsibility for the defence ministry; and purged his own Likud party of several rivals. The Knesset (parliament) is about to pass a two-year budget which should ensure political stability until 2019. The economy is growing at a sprightly 3.2% a year.

The opposition is in tatters. The main opposition grouping is the Zionist Union; its hapless leader, Yitzhak Herzog, has seen his credibility with his colleagues, and according to the polls with many of his voters, seep away towards Yair Lapid’s small Yesh Atid party.

These are sunny days, too, for Israel’s foreign relations. Boosted by trade in technology and arms, ties with African and Asian nations are flourishing. Mr Netanyahu has met Russia’s president Vladimir Putin four times in the past 14 months, reaching quiet arrangements safeguarding Israel’s interests in Syria, while continuing to insulate it from the bloody war across its border. Beneath the radar, Israel is working closely with its neighbours Egypt and Jordan to counter Islamic State. Farther afield, there is barely concealed close co-operation with the Sunni Gulf states on resisting Iran’s influence in the region. In recent months a rapprochement has also been brokered with the prickly President Recep Tayyip Erdogan of Turkey. China is keen to do ever more business with Israel.

No progress is being made on the peace process with the Palestinians, but no one seems to care very much. Israel’s relationship with Hamas, which rules the Gaza Strip, has shifted to one of cautious coexistence; the West Bank is mostly quiescent, with last year’s “knife intifada” having fizzled out. Not long ago, Mr Netanyahu’s critics were predicting a diplomatic assault if Israel didn’t start talking to the Palestinians. Instead, the supposedly furious Europeans seem consumed by their own problems and have little appetite for Middle Eastern diplomacy; the most they have been able to manage is a weedy insistence that products from Israeli settlements in the West Bank be labelled as such. And for the first time Mr Netanyahu is about to deal with a Republican in the White House.

Throughout his time in office, Mr Netanyahu has had a difficult relationship with Washington—during his first term with Bill Clinton and over the past eight years with Barack Obama. Pro-Israel statements from Donald Trump and his advisers, who made sure to omit all mention of a Palestinian state from the Republican Party manifesto, raise the prospect of an administration which will no longer give him any grief over settlement-building in East Jerusalem and the West Bank.

Happy times for Mr Netanyahu, then? Yes, but there are a few storm clouds. In the absence of a challenge from the feeble centre-left opposition, his troubles, such as they are, come from within his own coalition. The right wing is keen to pass a law legalising the status of Amona, a settler outpost of 42 families built 20 years ago in the West Bank on privately owned Palestinian land. Israel’s high court has ruled that the settlers must leave the outpost by December 25th. Defying the prime minister, his cabinet’s legislative committee voted on November 13th in favour of the law. Caught between the right wing and the court, Mr Netanyahu now faces open rebellion from some of his own ministers.

Mr Netanyahu has been playing a double game. To the world he expresses willingness to negotiate with the Palestinians, if only they were prepared to do so without preconditions. Meanwhile, he assures his right-wing constituency that a strategy of neither moving towards a Palestinian state, nor annexing the West Bank outright, is the only way to withstand international pressure while keeping the settlements. Critics, at home and abroad, thought that ultimately the international community would call his bluff. Instead, the arrival of President Trump may bring about the opposite outcome—his bluff is being called by the hawks at home.

But Iran these days looms much larger in Mr Netanyahu’s calculations than any of this. For the past year, since Mr Obama secured the necessary Senate votes to block a Republican veto of the nuclear agreement with Iran, the country has largely disappeared from the prime minister’s rhetoric. On November 13th it suddenly returned; in a speech Mr Netanyahu mentioned Iran no fewer than ten times. While his right-wing coalition colleagues want to use the new occupant of the White House to further their expansionist agenda in the West Bank, Mr Netanyahu is now much more hopeful that President Trump will make America Iran’s Great Satan again.

There are other nuisances bothering the prime minister. Nearly every other week a new scandal erupts, often involving an aide or a family member. In the past few days it has been the case of his personal lawyer and adviser, who also works for the local representatives of the German shipyard building submarines for the Israeli navy. Mr Netanyahu has been fending off accusations that his support for buying more subs is connected to this link. Now the attorney-general has ordered a probe.

Mr Netanyahu’s response has been to go on a bit of a crusade against the Israeli media. His office has begun issuing ferocious responses to exposés, attacking reporters for being “radical leftists”. Some see a plan behind this. Hoping to win a fifth election, Mr Netanyahu, like President-elect Trump, may feel that vilifying the media is the way to success.