Voters in Bavaria unsettled West Germany's 1-week-old government today by turning the Free Democratic Party out of their state parliament in an election strongly influenced by the change in Bonn.

The defeat appeared to confirm widespread discontent among many Free Democrats over the way the swing of their small, centrist party to the conservative-led coalition in Bonn was managed. The loss, which followed the party's disastrous defeat two weeks ago in the state of Hesse, is expected to be used by left-wing party members who are trying to undo the new alliance with Chancellor Helmut Kohl's Christian Democrats.

Also suffering a setback, the radical Green party failed to gain seats in the Bavarian assembly. This broke a string of victories by the 3-year-old countercultural protest party that is now represented in six of 11 state parliaments.

The Social Democrats, claiming a sympathy vote for Helmut Schmidt, who was ousted as chancellor Oct. 1, succeeded in holding their support in the largely conservative state. Before the dramatic events in Bonn, the Social Democrats had feared a substantial loss of votes in Bavaria.

Still, they were unable to make any dent in the popularity of Franz Josef Strauss, who was re-elected Bavarian state premier with the same solid backing his Christian Social Union drew in the last state elections four years ago.

Foreign Minister Hans-Dietrich Genscher, chairman of the Free Democrats, conceded on television that today's vote represented "a heavy defeat" for his party. It came in the face of a vigorous campaign by Genscher's erstwhile partners in Bonn, the Social Democrats, and his supposed new ally, Strauss, to discredit the Free Democrats.

But Genscher suggested that his strife-torn party had partly itself to blame for today's poor showing. "A party that is fighting itself can only make potential voters unsure," he said, calling for the reunification of the party.

Last week, Genscher rejected demands by embittered Free Democrats for his resignation and instead challenged his critics to put up a candidate against him at a party congress Nov. 5.

According to official results, the Christian Social Union won 58.3 percent of the vote, compared with 59.1 percent in the last election in 1978. The Social Democrats drew 31.9 percent, up slightly from their 31.4 percent four years ago.

The Free Democrats dropped to 3.5 percent from 6.2 percent in 1978, falling well below the 5 percent mark required for representation in parliament. Although the Greens more than doubled their support, scoring 4.6 percent up from 1.8 percent four years ago, they also fell short of the minimum.

The Bavarian assembly thus becomes a two-party parliament for the first time in its history, with the Christian Social Union winning 133 seats and the Social Democrats 71 seats.

The Free Democrats' slippage and Strauss' sustained strength in Bavaria appeared to be a boost for Strauss in his rivalry against Genscher to be Kohl's dominant partner.

The Bavarian leader nonetheless replied cautiously to an attempt by a reporter to get him to pronounce the centrist Free Democrats shattered. He noted that the story of German liberalism was "a history of splitting and of revival."

At the same time, Strauss took obvious pride in having maintained a clear-cut majority in his state, in contrast to earlier state elections this year in Hamburg and Hesse that resulted in no workable majorities. "Bavaria was governable, is governable and will remain governable," declared the 67-year-old Strauss, who is widely regarded as a sort of uncrowned monarch in Bavaria.