MOLINE, Ill. (AP) _ Nearly 13,000 striking workers at Deere & Co. plants in two states may vote this weekend on a tentative contract agreement to end a 6-month-old walkout.

Deere officials met for seven hours Tuesday with representatives of the United Auto Workers union before announcing the tentative settlement in the longest work stoppage in the history of the farm implement company.

''Thank God, thank God, thank God,'' said Davenport, Iowa, Mayor Thomas Hart. ''Along with the entire Quad Cities, I'm just breathing a huge sigh of relief and smiling an uncontrollable smile.''

Neither side would discuss terms of the settlement, which affects workers in 13 plants in Iowa and Illinois.

''There's an obvious interest, probably by both sides, in seeing that this long struggle is resolved,'' said UAW spokesman Carl Mantyla.

Three UAW locals went on strike after the master contract expired Aug. 22, and the company imposed a lockout at 10 other plants. Only the company's Horicon, Wis., factory, which makes consumer and lawn-care products, has continued operating, said Deere spokesman Bob Shoup.

Three Davenport, Iowa, television stations interrupted President Reagan's State of the Union Address to announce the news.

Bill Casstevens, UAW vice president, said the agreement was contingent on resolving local as well as national issues, and on the actual contract language.

''It's expected that if those matters are taken care of ... ratification meetings could be scheduled this weekend,'' Mantyla said. ''Definitely, from the union standpoint, there's a sense that the union has accomplished what it set out to accomplish.''

The contract must be approved by a simple majority of UAW workers at Deere locals in six states.

The pact, which covers more than 12,000 active employees and 10,000 laid- off workers, affects production and maintenance workers in Iowa and Illinois, as well as warehouse and parts depot workers at facilities in East Moline, Ill., Denver, Atlanta, Minneapolis and Memphis.

Workers at those five warehouse and parts depots were allowed to work during the strike.

Mantyla said picketing would continue until the agreement is ratified. He said employees could return to work as early as next week if the contract is approved.

Although the two sides had been meeting sporadically since April, Tuesday's negotiating session was the first since Dec. 3. A judge had ordered the bargaining to resume.

Negotiators said after the Dec. 3 meeting that they were $17 million apart in their proposals for a three-year period.

Under the old contract, the average Deere worker received wages and benefits of $24.64 an hour, with the average base pay being $14.85 an hour.

Despite the deadlock, Casstevens presented the union's case to Deere's board of directors Dec. 11, two days after the company announced it had lost $230 million in fiscal 1986. It was the first annual loss since 1933 for the world's largest maker of farm tractors and agricultural machinery.

Dennis Kinard, committeeman for UAW Local 838 in Waterloo, Iowa, said the tentative agreement came as a surprise.

''There's no reason to be happy until we see what we've got,'' Kinard said. ''But they'd (the membership) like to get back to work.''