ST. PAUL, Minn. (AP) _ Five years after trading sharp public insults and promoting a feud between their neighboring states, Minnesota Gov. Rudy Perpich and former South Dakota Gov. William Janklow have become close pals.

And they owe it all to a trip to China.

''He's a good person and we became friends,'' Janklow said of Perpich. ''As a human being, he really cares about people and things.''

''We're still competitors, but we're pals. ... I'm a good Republican and he's a good Democrat,'' said Janklow. He is co-chair of Vice President George Bush's presidential campaign in South Dakota.

Janklow, 48, who left office at the beginning of the year, was recently appointed by Perpich to the Minnesota Public Facility Authority, created to assist in rural development.

''I can't think of anyone better qualified, and I'm very happy he accepted,'' said Perpich, 59.

Janklow, a lawyer, still lives in Brandon, S.D., a suburb of Sioux Falls, but maintains an apartment in the Twin Cities of Minneapolis-St. Paul, where he is managing director of the public finance department of the Dougherty, Dawkins, Strand and Yost investment banking firm.

All this buddy-buddy talk is a big change since late 1982, shortly after Perpich was elected to his first full term, when he said South Dakota was ''50th in everything.'' He said Minnesota businesses shouldn't be so anxious to relocate in the neighboring state just because of its low taxes.

''I suppose they'll claim they have major league baseball in Minnesota,'' was one of Janklow's retorts at a time when the Minnesota Twins were foundering in the American League.

A standing joke in the Capitol pressroom was that Perpich's first official act, after taking office in January 1983, would be to order the Minnesota National Guard to block all highways leading to South Dakota.

The two men even met in a nationally televised debate on the Public Broadcasting Service's ''MacNeil-Lehrer NewsHour.''

''The best thing I have going for me to sell South Dakota is Rudy Perpich,'' Janklow told the TV audience. ''The more he keeps shooting off his mouth, the better my state's going to develop.''

Perpich said Minnesota is a much better place to live than South Dakota. ''Minnesota has a quality of life that's one of the best in the nation,'' he said then.

That all changed when both men were among a small contingent of governors invited through the National Governors' Association to visit China in December 1983.

''At that time he (Janklow) had this (medical) condition that had to do with cold weather,'' said Perpich. ''He had to have this injection in case he passed out or something.''

Because of his training as a dentist, Perpich was elected to carry ''the bee sting kit'' and give Janklow an injection if necessary, Janklow said.

''Rudy said, 'Oh Janklow, if something happens to you, I'm going to give you a shot and you're going to die and everybody's going to say I killed you,''' Janklow said.

''So I stuck to him like glue,'' said Perpich. ''I was sincere, and then we got to be the best of friends. We really got to be big buddies. If he went for a walk, I went for a walk.''

Janklow said he got sick once during the China trip and Perpich came to his assistance. ''Rudy really looked after me,'' he said.

Janklow said he found an additional reason to like his fellow governor.

''He had his lovely wife, Lola, and I mean that,'' said Janklow. ''Lola is one of the most lovely human beings I've ever met. You can't stay mad at anybody that's married to her.''