Zenko Suzuki, a political pragmatist best known for steering rivals toward a consensus, was formally elected prime minister of Japan today and chose a cabinet of veterans seemingly designed to promote harmony in his party.

The 69-year-old party tactician was elected overwhelmingly, as expected, at a session of parliament to succeed Masayoshi Ohira, who died on June 12.

His new cabinet contains no major surprises and is heavily sprinkled with men who have served in previous cabinets. Each of the major factions in Suzuki's Liberal Democratic Party was rewarded with cabinet posts in a manner that should minimize friction.

The average age of the cabinet members is 63.5 years and nearly two-thirds of them had served in previous administrations, although as heads of different ministries.

Suzuki, for many years chairman of his party's executive council, emerged two weeks ago as a possible compromise candidate whose selection would head off another struggle for leadership among the party factions.

He was chosen party president Tuesday, thus assuring his elevation to prime minister because of his party's large majority in the lower house. He received 291 votes today as four independents joined the Liberal Democratic ranks to vote for him.

After his cabinet selections were announced, they were formally invested tonight at a visit to the Imperial Palace.

There was little in his selection to suggest what direction his administration will take but the new government is likely to continue the Ohira administration's pro-Western foreign policy and continue the late prime minister's off-and-on campaign for caution in government finances.

Masayoshi Ito, who had been chief cabinet secretary under Ohira, was appointed foreign minister and is expected to sustain the moderate internationalism that marked the preceding government.

Ito told reporters he interpreted his appointment as an intent to follow Ohira's direction in diplomatic affairs and to increase what he said was the large international confidence in Japan that Ohira had built up.

"Our international position is high and our role is big," he added, "and so I feel my duty heavily."

Ito is a bureaucrat-turned-politician who has played no significant role in foreign affairs, except as a close aide to Ohira. As chief cabinet secretary, he was in charge of enunciating Ohira's policies and seemed to have no trouble accepting them. As prime minister, Ohira had insisted on making compromises to maintain close ties with the United States and at the same time directed the country toward opening new relations with Middle Eastern countries and Europe.

Ito had been Ohira's friend since the 1930s and had been a close ally in parliament. He led the country as acting prime minister for 36 days, between the time of Ohira's death and the selection today of Suzuki.

For the position of finance minister, which will be a crucial one this year, Suzuki turned to Michio Watanabe, an outspoken and aggressive politician and veteran of two previous cabinet posts.

At 56, Watanabe is one of the younger members of the cabinet and is regarded as an unusually forceful young figure in the party. He is known as an expert on agricultural matters as well as tax issues. He has been second in command of the budget committee in the lower house of parliament.

The Finance Ministry has a powerful voice in setting government spending and in trimming budgets of the other ministries. It is at the center of the current critical debate over whether to increase Japan's defense budget, as the United States has urged. The ministry so far has objected to a plan to accelerate a modest five-year increase in defense spending.

That and several domestic spending proposals ran against the Ohira administration plan to curtail government spending in an attempt to lessen Japan's dependence on deficit financing and government bonds.

Suzuki has said his first priority will be to follow the Ohira plan of fiscal restraint and he apparently picked Watanabe to force through some difficult choices.

For his own chief cabinet secretary, Suzuki chose Kiichi Miyazawa, a close friend who once was mentioned as a likely candidate for prime minister. Mayazawa is known as one of Japan's more internationalist-minded leaders. He is a prominent member of the Trilateral Commission, composed of influential U.S., European and Japanese leaders, and is widely known abroad.

His job is officially that of spokesman for the prime minister to the press and the rest of the government but the post carries broad authority to represent the top leader in settling disputes within the cabinet.

The other key ministry, international trade and industry, was given to Rokusuke Tanaka, a politician who also had been close to Ohira. That ministry had broad authority in almost all economic and trade issues coming before the government.

Suzuki gave lesser positions to the two men who once were rumored to be the top candidates for prime minister. Toshio Komoto was made director general of the economic planning agency and Yasuhiro Nakasone was appointed director general of the administrative management agency.

In naming officers for the Liberal Democratic Party, Suzuki showed little inclination to shake things up, returning to their posts the more important figures who had served under Ohira.