It’s just over three months since the NATO countries, under authorisation from the UN security council, began their campaign of air strikes against Colonel Muammar Gaddafi’s forces in support of the Libyan opposition. For most of that time, the situation on the ground has seemed like a military stalemate, but there is now some evidence the opposition may be getting the upper hand.

According to the BBC this morning, there has been fierce fighting about 80 kilometres south-west of Tripoli, near the town of Bir al-Ghanam. Its correspondent says “the rebels appear to be gradually consolidating their position in the western mountains”, and “say they are approaching the gates of Tripoli”. There is also talk of a renewed push from the east “in the near future”.

By the standards of most wars, three months is a relatively short time. But as the cliché has it, we live in an age of instant gratification, and impatience with the lack of a decisive result has taken hold in such disparate quarters as the African Union and the Republican majority in the US house of representatives.

African Union leaders have been meeting under the chairmanship of South African president Jacob Zuma to try to find a diplomatic solution to the conflict. But although they announced a “breakthrough” yesterday, in the shape of an agreement by Gaddafi to not be “part of the negotiation process”, it’s abundantly clear that the opposition will not accept anything less than the complete removal of the Gaddafi regime.

Nor is there any real reason why they should.

The politics of the American congressional debate are a bit more interesting. Having spent three years attacking Barack Obama as “soft” on security issues, Republicans are now enjoying the guilty pleasure of switching sides and criticising him from the opposite direction, for being too bellicose.

Hence the rejection last week of a resolution that would have authorised a continuing US military role in Libya. The vote was basically symbolic — more concrete moves to limit funding were rejected — but it reflected the view of Republicans (as well as several Democrats) that Obama has wrongly ignored congress’s constitutional powers over war making.

That’s a perfectly reasonable criticism — ideally the president should have sought congressional authorisation in the first place, although the legality of the situation is debatable. The problem is that coming from Republicans, who promoted and defended the patently illegal invasion of Iraq, the attack simply lacks credibility.

If the Libya campaign goes according to plan, and if Gaddafi is gone and the opposition in power within another few months, none of this will matter — just as no one now remembers, for example, the debate over the legality of the 1989 intervention in Panama.

But if the conflict drags on further, the consequences could be more serious. Peace talks will become a more attractive option for both sides, and may result in some sort of compromise outcome that would give Gaddafi’s circle, if not the dictator himself, a continuing share in power. That in turn would deal a blow to the momentum for change in the rest of the Arab world — not to mention its domestic political effects in the US.

Despite the deadlock in Libya, progress has been continuing throughout the region: major constitutional reforms have been announced in Morocco and Jordan, Yemen’s injured president looks unlikely to ever return to power, and stirrings of change have been felt even in Saudi Arabia.

It’s too early to say that the wave of democratisation is unstoppable. But if the Libyan opposition really does get the upper hand, then autocrats everywhere will be in for some sleepless nights.