HE HAS been in office for only two months, but already Rafael Correa, Ecuador's president, has provoked a full-blown conflict of powers that pits the country's Congress against its courts. The immediate issue is his plan for a Constituent Assembly, whose job would be yet another rewriting of the constitution, which dates only from 1998. The real battle is for power, between Ecuador's political parties and Mr Correa, who calls himself a Christian leftist and is a friend of Venezuela's Hugo Chávez.

On March 7th, the electoral tribunal decided, by three votes to two, to expel 57 opposition legislators from Congress. The previous day they had backed moves to sack the head of the tribunal because he had used his casting vote to call a referendum on the new assembly. That was a job for the legislature, they said. Both decisions were of dubious legality.

The action moved to the streets. The police stopped the 57 from entering Congress. When they tried to meet at a hotel, Mr Correa's supporters beat up one and attacked another's car. The next day, two legislators were injured in a clash with police. The Constitutional Court, the highest legal body, has declined to rule on the dispute. Mr Correa wants to replace the sacked legislators with their designated alternates.

Both Congress and the president were chosen in the same general election last year. The president's main weapon is his popularity: polls give him an approval rating of over 70%. He promises a “citizens' revolution” against a corrupt “partyocracy”. His own improvised party did not take part in the congressional election.

Mindful of Mr Correa's popularity, Congress did not block the referendum. But it did try to include a provision which would stop any assembly from booting out elected authorities. But that, of course, is precisely what Mr Correa wants it to do.

The president will probably get his way. But not necessarily for long. He is picking fights on all sides: with newspaper editors, businessmen and the political leaders of Guayaquil, the economic capital. Ecuador is a fractured country, with many regional power bases. That has meant that Congress, not the presidency, has often been the locus of power. Legislators have ousted two presidents since 1997. Lucio Gutiérrez, toppled in 2005, is emerging as Mr Correa's most powerful opponent. The president is winning a battle, but not yet the war.