How do judges and prosecutors get chosen in different countries?

In the USA I understand many get elected, Supremes get appointed, and as with so many things the details will change from State to State. Is this correct? Which other “levels” within the USA judiciary get appointed?
In Spain, they have to pass what’s called an “Oposición;” this is a kind of exam used to select Government permanent or tenured employees. Both judges and DAs get tenure. When an Oposición for the basic version of either of those comes up, what it opens up is several posts in a training course, let’s say N posts. The N best candidates who are deemed acceptable to the test’s tribunal (i.e., the number who gets accepted can be lower than N but never higher) get to spend several years in training in Madrid, then several months (the details vary by the specific kind of posts available to them after the course, i.e., DA or Judge, Civil or Criminal…) on location with a mentor. If they flunk the course, which can happen, they’re out and better start looking at jobs out of the public system.
Promotions to higher ranks are by Internal Oposición, i.e., a similar setup but candidates must already be DAs or Judges; the exception is the Supremes, who get appointed by Parliament (both Chambers).
Is my admittedly vague understanding of the USA system correct (within being incomplete)?

How are judges and DAs chosen in other countries?

All federal judges are appointed by the President and confirmed by the Senate. There are also federal magistrates, who are judges who oversee minor things such as bail hearings, and these are appointed by the federal district judges in their district for a term of eight years.

In the state judicial systems, some local judges and trial judges are elected, but most appellate judges are appointed by the governor, usually with a confirmation procedure involving the state legislature.

Judges and prosecutors are much less quasi-civil service-style positions than in much of Europe. In Ohio, all judges at all levels of state government (from municipal and county courts of common pleas, to courts of appeals, all the way up to the Supreme Court of Ohio) are elected to six-year terms. County prosecutors are all elected in this state, also, to four-year terms.

Not just the Supremes, but all Federal circuit and district court judges are appointed under article III of the constitution.

State level judicial systems will differ, of course. Here’s a pdf listing judicial selection methods in the various states:

Here in Pennsyvania all judges are elected to ten year terms in partisan elections (each party gets to choose a candidate through a primary). After their first term is up instead of running for reelection there’s a retention vote (single candidate, yes/no) on whether or not they’ll serve another term. Any vacancies to do death, retirement, removal, for failure to win a retention vote are filled by the Governor and confirmed by the state Senate. Such judges serve only until the next election. District Attorneys are elected to four year terms. There’s a group, Pennsylvanians for Modern Courts working to replace partisan elections with merit selection/retention.

Ohio has had several similar reform efforts, all of which have failed. People just like electing judges here, even if far too often they only vaguely recognize the name on the ballot. Merit-selection proposals are usually shot down by critics who say “They’re trying to take away your vote.”

U.S. Attorneys (the Federal prosecutor for each district) are also appointed by the President, with the advice and consent of the Senate. They serve at the pleasure of the President (but mass firings are unusual except when there’s a change in the White House; hence the controversy over the Gonzales firings a few years ago). The Attorney General and district courts also have limited power to fill vacancies among U.S. Attorneys.

BTW, friedo, it’s “magistrate judges” now.

Many states in the United States have the chief prosecutor (of whatever title) elected, but not all: New Jersey County Prosecutors, for instance, are appointed by the Governor with the consent of the State Senate.

In the case of the United Kingdom, a change has recently occurred, in which the selection of judges is through a Judicial Appointments Commission, rather than the traditional use of the Lord Chancellor’s office (noted, for starters, here)

The French system is relatively similar to the Spanish one.
The candidates must succeed in a competitive exam (as in the Spanish example, there are given number of slots each year, and the candidates who get the best grades are taken in). The exams are of course essentially about law.

They then join a specialized school for three years, alternating courses and training periods in courts. At the end of the three years, they’re ranked, and they make their pick, in the order of the ranking, amongst the available jobs.

The system is the same for both judges and prosecutors.
Latter promotions are decided by the executive upon proposal by a council of magistrates.

This system doesn’t apply to a variety of particular courts (administrative courts, whose judge are selected by a competitive exam for public servants, first level labour law courts, whose judges are elected by employers and workers, etc…)

There’s no “quasi”, in Spain they’re civil servants. A Spanish judge may get his first post in a province and later move to another province (they still have to “win” this new post, even if both are at the same level). They’re employees of the Ministry of Justice.

Not true for France, though. The status of civil servants and judges are very different. And these statuses aren’t regulated by the same laws, either.

Are you sure it is correct for Spain? Judges generally enjoy various protections and privileges not afforded to civil servants. They can’t be easily dismissed, and they generally can’t be given orders, for instance.

Same as your average Funcionario in Spain. More than firing them, you need to carve them out of their office (better bring a full team of draft horses, too); they can’t be given any orders out of their job description…

It’s one of the reasons why some Governments have created the figure of the “Permanent Contract Employee” (my dad was one when he was the Purchasing Department at the local hospital, his salary was paid by the Autonomous Government): those can get fired, they’re no more permanent than someone with a permanent contract in a private company.