After a last-minute court order and a long and often contentious Kennecott Copper Corp. stockholders' meeting, voting ended yesterday in the largest Wall Street proxy battle in years.

Kennecott directors will have to wait two weeks to learn whether their intense legal and public relations campaign successfully defeated the take-over challenge from Curtiss-Wright Corp. led by its Chairman T. Roland Berner.

All of the ballots cast for Kennecott or Curtiss slate of directors will be tabulated by Corporation members of the Trust Com., the inspector of the election, and results will not be announced until 3 P.M. May 16.

Late Monday, it appeared that Kennecott had won at least a respite when Manhattan District Court Judge Lloyd MacMahon blocked Curtiss-Wright from voting its 9.9 percent of Kennecott at yesterday's annual meeting of America's largest copper company.

In issuing his order, the judge found that Curtiss-Wright had violated federal antitrust law and securities law in acquiring $77 million worth of Kennecott stock and in battling to win shareholders' support for its alternate slate of directors.

Curtiss-Wright's plan for Kennecott were "not supported by any objective research or study whatsoever" and its statements to Kennecott stock-holders bordered on recklessness, the judge said.

As Kennecott Chairman Frank Milliken was about to open his annual meeting in the jammed grand ball-room of the Plaza Hotel with overflow stockholders watching on closed-circuit television from other rooms, his adversary, Berner, strode onto the platform with a fist in the air announcing he had a stay of MacMahon's order.

A two-judge federal appeals court that got the case 16 hours before the annual meeting began did not address itself to the merits of the case. It ruled that Curtiss-Wright could vote its Kennecott shares but that the present directors should retain control of Kennecott until a full appeal is heard.

If the appeals court upholds MacMahon, the proxy battle that has seen Berner and Milliken exchange personal attacks over the last two months will be moot.

Berner told the stockholders that MacMahon's decision had seriously injured his cause. He appealed to them to ignore what he called an "erroneous and unexpected" decision.

Berner's plan for Kennecott, which has obvious appeal to stockholders, is to sell Carborundum Co., which Kennecott acquired Dec. 31 for $567 million and use the proceeds plus other Kennecott funds to make a $40-a-share offer for half its 33.2 million outstanding shares.

Kennecott closed yesterday at 23 5/8.

Berner also has built his proxy campaign on charges that the Milliken-led management is incompetent, Kennecott earnings have fallen for three straight years and were $7.3 million on revenue of $976.7 million last year.

First-quarter earnings were $5.3 million, down 25 percent from the same quarter of 1977, according to Kennecott's latest report.

Curtiss-Wright, which had a net profit of $16 million last year on sales of $309.9 million, also had a bad first quarter, down 23 percent from last year.

The stockholders who spoke expressed frustration with a mangement that has cut back its dividends to 16 cents a share.

But few said they had confidence in Berner, and the sentiment seemed to be that Kennecott's directors would win the proxy fight because, as one said, "Although they are not widely admired, Berner's track record is, if anything, even less impressive."

Richard Nordlinger of Englewood Cliffs, N.J., harangued Berner for planning to sell off Carborundom. "A vote for Curtiss-Wright is a vote for the destruction of Kennecott," he said.

Berner had a few supporters, however, like Chicago stockbroker Gerald Rivlin who criticized Kennecott for not consulting its stockholders on major corporate decisions and not taking their welfare sufficiently into account.

Berner pledged to the meeting yesterday that he would be able to carry out his plans with Kennecott despite MacMahon's criticism and despite claims by Milliken and other directors of the copper company that Berner would strip Kennecott and leave it in ruinous shape.

Kennecott President William Wendel counterattacked by discussing Berner's record as a manager.

"No discussion of Mr. Berner would really be complete without the Wankel engine," Wendel said. Curtiss-Wright bought exclusive North American rights to the Wankel rotary engine and even gave its New Jersey headquarters the address "1 Wankel Plaza."

Wendel recounted Berner's promise to Curtiss-Wright stockholders about the Wankel's future. "When it came to the Wankel engine in American cars, Berner took his stockholders for a buggy ride . . . I hope you won't let him take you for a buggy ride, too," Wendel said.

Berner, who has a reputation as a lawyer with great gifts in takeover battles, repeated himself frequently in his 40-minute presentation to the stockholders. He reiterated over and over again that his idea for buying back half of Kennecott's stock at $40 would work, and he made repeated promises of a vigorous legal appeal of MacMahon's decision.

Milliken told reporters after the stockholders' meeting: "We're very confident of the outcome of this fight."

"I hope you never get involved in a proxy fight," Milliken told the meeting. "It's aggravating and time consuming, to say the least."