While no one is saying exactly how it happened, Portland got a new mayor Monday, who is actually the old mayor, Nicholas Mavodones, agreeing to come back for one more turn.

It’s a good move for the city. Portland is in the last year of a nearly 90-year-old form of government, in which the City Council elects one of its members to serve as the council’s ceremonial leader, chairing meetings and representing the city to the public.

Mavodones is well-liked and experienced and should provide a steady hand during a difficult budget season. And he will be a familiar face to representatives of the state and federal government and the business community, with whom the city must interact.

But just because Mavodones is a good choice doesn’t mean that this was a good process, and if there were any doubts about Portland’s need to move to a directly elected mayor, this should quell them. This is not a job that should be filled with behind-the-scenes maneuvering, and that is what appears to have happened here.

Several councilors reported that their colleague Cheryl Leeman had told them that she had the five votes needed to take the job. That put an end to the race.

But on Monday, Leeman announced that she had changed her mind and nominated Mavodones.

He was “elected” by a unanimous council without any debate. Leeman said she felt what the city needed was continuity and so, in her opinion, Mavodones made a better mayor.

Even if that’s all there was to it — and we have our doubts that it is — that is a terrible way to fill such an important job. Leeman also would have been a good, experienced mayor (a job she held in 2000 and 2001), and as the council’s only Republican, she would have made a good representative for the city to a Republican-controlled Legislature.

A better process would have had both candidates in the room at the same time, and let the voters compare their relative strengths and make a choice. That’s the system that we are going to get next year, when the voter-approved charter changes go into effect.

Unlike the next mayor, who will be directly elected, Mavodones did not run citywide and he did not lay out a list of issues that he considered to be his priorities. If he has any changes of direction in mind for the city, the first time most of us will hear about them will probably be the day he is inaugurated.

When she was still identified as the likely mayor, Leeman defended the current system, saying, “It’s called politics. It’s not the process beforehand (that matters) as much as what the person does with the position once they’ve got it.”

We think that the “process beforehand” does make a difference, and directly electing a mayor will be a better process than what took place this week.

It is called politics, and it is about time that Portland started doing it in public.