Jim Palmer beat Toronto tonight, 6-3, then the Baltimore Orioles and the ace pitcher ended an eight-month tug of war by agreeing to extend the 34-year-old veteran's contract for two years through 1983, with an additional option year.

Palmer, his agent Ed Keating, team owner Edward Bennett Williams and Hank Peters, the general manager, conducted a 30-minute closed door meeting in Memorial stadium after tonight's game to iron out the agreement.

The stylish right-hander had given himself some bargaining power by scattering seven hits and pitching a 6-3 complete game against the Blue Jays.

"It's a fair contract," Palmer said after the meeting."It hasn't been physically signed yet but I believe Williams is a man of his word." "I couldn't be happier," Williams said. "We hope to have Jim with the Oriles for the remainder of his career. And I hope to be around in 1984 to negotiate his next contract."

Before reaching 1983, though, Palmer must meet certain performance clause of the new contract, "I don't really know all the members but I'm pretty sure that pitching around 200 innings is one of them," he said.

Palmer rejected a three-year extension valued at about $1.3 million, with a base salary of $325,000. Terms of the contract were not disclosed but the pitcher said he would receive a $25,000 graduated increase for each year of the extension plus a signing bonus for the third year should he meet the performance requirements.

Said Peters: "The option is simply based on criteria in the contract that automatically extends it."

Palmer said Williams' "faithful and sensible negotiating" would help the morale of the team and would show the younger players the owner is serious in keeping the Orioles in contention.

"Ed just wanted to make sure I was comfortable. He is a much more realistic person fiscally," Palmer said, referring to Jerold Hoffberger, who shunned the liberal spending that had become popular among many owners in the mid '70s. Williams purchased the Orioles from Hoffberger last August.

Palmer, who has won the Cy Young Award three times, was first signed by the Orioles as a free agent in 1963. The 13-year-veteran has won 20 games in a season eight times. After an injury-plagued 1979 season, he seems to be back on the road to a big season.

He won his seventh game tonight, against four losses, and except for the seventh inning had little trouble with the last-place but much improved Blue Jays.

Palmer gave up three runs in the seventh on two singles, Kiko Garcia's first error this season, at shortstop, a fielder's choice and a sacrifice fly.